@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function loadFromDirectory(string $dir) |
33 | 33 | { |
34 | - if (! is_dir($dir)) { |
|
34 | + if (!is_dir($dir)) { |
|
35 | 35 | throw new \InvalidArgumentException(sprintf('"%s" does not exist', $dir)); |
36 | 36 | } |
37 | 37 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | return array_reduce( |
66 | 66 | $declared, |
67 | - function ($classList, string $className) use ($includedFiles) { |
|
67 | + function($classList, string $className) use ($includedFiles) { |
|
68 | 68 | $reflClass = new \ReflectionClass($className); |
69 | 69 | $sourceFile = $reflClass->getFileName(); |
70 | 70 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $listClass = \get_class($list); |
106 | 106 | |
107 | - if (! isset($this->loadedClasses[$listClass])) { |
|
107 | + if (!isset($this->loadedClasses[$listClass])) { |
|
108 | 108 | $this->loadedClasses[$listClass] = $list; |
109 | 109 | } |
110 | 110 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function loadFromFile(string $fileName) |
118 | 118 | { |
119 | - if (! is_readable($fileName)) { |
|
119 | + if (!is_readable($fileName)) { |
|
120 | 120 | throw new \InvalidArgumentException(sprintf('"%s" does not exist or is not readable', $fileName)); |
121 | 121 | } |
122 | 122 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function getLoggedEvent(): Query |
54 | 54 | { |
55 | - if (! $this->hasLoggedEvents()) { |
|
55 | + if (!$this->hasLoggedEvents()) { |
|
56 | 56 | throw new \LogicException('No more events logged!'); |
57 | 57 | } |
58 | 58 | |
@@ -64,6 +64,6 @@ discard block |
||
64 | 64 | */ |
65 | 65 | public function hasLoggedEvents(): bool |
66 | 66 | { |
67 | - return ! $this->logs->isEmpty(); |
|
67 | + return !$this->logs->isEmpty(); |
|
68 | 68 | } |
69 | 69 | } |
@@ -99,8 +99,8 @@ |
||
99 | 99 | { |
100 | 100 | return array_filter( |
101 | 101 | $options, |
102 | - function ($value) { |
|
103 | - return ! empty($value) || \is_int($value) || \is_bool($value) || \is_float($value); |
|
102 | + function($value) { |
|
103 | + return !empty($value) || \is_int($value) || \is_bool($value) || \is_float($value); |
|
104 | 104 | } |
105 | 105 | ); |
106 | 106 | } |
@@ -12,16 +12,16 @@ |
||
12 | 12 | |
13 | 13 | private static function orderedFixtureSorter(): \Closure |
14 | 14 | { |
15 | - return static function ($a, $b): int { |
|
15 | + return static function($a, $b): int { |
|
16 | 16 | if ($a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { |
17 | 17 | return $a->getOrder() - $b->getOrder(); |
18 | 18 | } |
19 | 19 | |
20 | - if ($a instanceof OrderedFixtureInterface && ! $b instanceof OrderedFixtureInterface) { |
|
20 | + if ($a instanceof OrderedFixtureInterface && !$b instanceof OrderedFixtureInterface) { |
|
21 | 21 | return 1; |
22 | 22 | } |
23 | 23 | |
24 | - if (! $a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { |
|
24 | + if (!$a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) { |
|
25 | 25 | return -1; |
26 | 26 | } |
27 | 27 |
@@ -6,11 +6,11 @@ |
||
6 | 6 | use Twig\Extension\AbstractExtension; |
7 | 7 | use Twig\TwigFunction; |
8 | 8 | |
9 | -if (! class_exists('\Twig\Extension\AbstractExtension')) { |
|
9 | +if (!class_exists('\Twig\Extension\AbstractExtension')) { |
|
10 | 10 | class_alias(\Twig_Extension::class, '\Twig\Extension\AbstractExtension'); |
11 | 11 | } |
12 | 12 | |
13 | -if (! class_exists('\Twig\TwigFunction')) { |
|
13 | +if (!class_exists('\Twig\TwigFunction')) { |
|
14 | 14 | class_alias(\Twig_Function::class, '\Twig\TwigFunction'); |
15 | 15 | } |
16 | 16 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | */ |
58 | 58 | public function execute(Query $query, string $verbosity = self::VERBOSITY_ALL_PLAN_EXECUTION): Cursor |
59 | 59 | { |
60 | - if (! \in_array($query->getMethod(), self::ACCEPTED_METHODS, true)) { |
|
60 | + if (!\in_array($query->getMethod(), self::ACCEPTED_METHODS, true)) { |
|
61 | 61 | throw new \InvalidArgumentException( |
62 | 62 | 'Cannot explain the method \'' . $query->getMethod() . '\'. Allowed methods: ' . implode(', ', self::ACCEPTED_METHODS) |
63 | 63 | ); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function buildClientConfiguration(array $conf): ClientConfiguration |
81 | 81 | { |
82 | - if (! $conf['uri']) { |
|
82 | + if (!$conf['uri']) { |
|
83 | 83 | $conf['uri'] = $this->buildConnectionUri($conf['hosts']); |
84 | 84 | } |
85 | 85 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return 'mongodb://' . implode( |
114 | 114 | ',', |
115 | 115 | array_map( |
116 | - function (array $host) { |
|
116 | + function(array $host) { |
|
117 | 117 | return sprintf('%s:%d', $host['host'], $host['port']); |
118 | 118 | }, |
119 | 119 | $hosts |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | $clientKey = null !== $databaseName ? $name . '.' . $databaseName : $name; |
152 | 152 | |
153 | - if (! isset($this->clients[$clientKey])) { |
|
153 | + if (!isset($this->clients[$clientKey])) { |
|
154 | 154 | $conf = $this->configurations[$name]; |
155 | 155 | $options = array_merge( |
156 | 156 | [ |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $connectionName .= '.' . $input->getOption('connection'); |
67 | 67 | } |
68 | 68 | |
69 | - if (! $this->container->has($connectionName)) { |
|
69 | + if (!$this->container->has($connectionName)) { |
|
70 | 70 | throw new \LogicException(sprintf('No connection named \'%s\' found', $input->getOption('connection'))); |
71 | 71 | } |
72 | 72 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | */ |
68 | 68 | private function walkAndConvertToUTCDatetime($data) |
69 | 69 | { |
70 | - if (! \is_array($data)) { |
|
70 | + if (!\is_array($data)) { |
|
71 | 71 | return $data; |
72 | 72 | } |
73 | 73 |