@@ -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 | } |
@@ -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 | ); |
@@ -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 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | private function buildClientConfiguration(array $conf): ClientConfiguration |
| 62 | 62 | { |
| 63 | - if (! $conf['uri']) { |
|
| 63 | + if (!$conf['uri']) { |
|
| 64 | 64 | $conf['uri'] = self::buildConnectionUri($conf['hosts']); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return 'mongodb://' . implode( |
| 90 | 90 | ',', |
| 91 | 91 | array_map( |
| 92 | - static function (array $host): string { |
|
| 92 | + static function(array $host): string { |
|
| 93 | 93 | return sprintf('%s:%d', $host['host'], $host['port']); |
| 94 | 94 | }, |
| 95 | 95 | $hosts |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $clientKey = null !== $databaseName ? $name . '.' . $databaseName : $name; |
| 113 | 113 | |
| 114 | - if (! isset($this->clients[$clientKey])) { |
|
| 114 | + if (!isset($this->clients[$clientKey])) { |
|
| 115 | 115 | $conf = $this->configurations[$name]; |
| 116 | 116 | $options = array_merge( |
| 117 | 117 | [ |
@@ -120,8 +120,8 @@ |
||
| 120 | 120 | { |
| 121 | 121 | return array_filter( |
| 122 | 122 | $options, |
| 123 | - function ($value): bool { |
|
| 124 | - return ! empty($value) || \is_int($value) || \is_bool($value) || \is_float($value); |
|
| 123 | + function($value): bool { |
|
| 124 | + return !empty($value) || \is_int($value) || \is_bool($value) || \is_float($value); |
|
| 125 | 125 | } |
| 126 | 126 | ); |
| 127 | 127 | } |