@@ -76,7 +76,7 @@ |
||
| 76 | 76 | */ |
| 77 | 77 | public function getTime(): float |
| 78 | 78 | { |
| 79 | - return (float)($this->data[self::TIME_KEYWORD] * 1000); |
|
| 79 | + return (float) ($this->data[self::TIME_KEYWORD] * 1000); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | */ |
| 91 | 91 | public function setFilters($filters) |
| 92 | 92 | { |
| 93 | - $this->filters = (array)$filters ?? []; |
|
| 93 | + $this->filters = (array) $filters ?? []; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -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 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | try { |
| 51 | 51 | $result = $service->execute($query); |
| 52 | - } catch (\InvalidArgumentException $e) { |
|
| 52 | + }catch (\InvalidArgumentException $e) { |
|
| 53 | 53 | return new JsonResponse([ |
| 54 | 54 | "err" => $e->getMessage() |
| 55 | 55 | ]); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | private function walkAndConvertToUTCDatetime($data) |
| 67 | 67 | { |
| 68 | - if (! \is_array($data)) { |
|
| 68 | + if (!\is_array($data)) { |
|
| 69 | 69 | return $data; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | if (method_exists($item, 'toDateTime')) { |
| 59 | - return 'ISODate("' . $item->toDateTime()->format('c') . '")'; |
|
| 59 | + return 'ISODate("'.$item->toDateTime()->format('c').'")'; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (method_exists($item, '__toString')) { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | if (\is_array($item) || \is_object($item)) { |
| 71 | - return self::prepareUnserializableData((array)$item); |
|
| 71 | + return self::prepareUnserializableData((array) $item); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | return $item; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $this->containerBuilder = $container; |
| 34 | 34 | $config = $this->processConfiguration(new Configuration(), $configs); |
| 35 | 35 | |
| 36 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 36 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 37 | 37 | $loader->load('services.xml'); |
| 38 | 38 | |
| 39 | 39 | $this->defineClientRegistry($config['clients'], $container->getParameter("kernel.environment")); |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | ); |
| 103 | 103 | $connectionDefinition->setFactory([new Reference('mongo.connection_factory'), 'createConnection']); |
| 104 | 104 | $connectionDefinition->setPublic(true); |
| 105 | - $this->containerBuilder->setDefinition('mongo.connection.' . $name, $connectionDefinition); |
|
| 105 | + $this->containerBuilder->setDefinition('mongo.connection.'.$name, $connectionDefinition); |
|
| 106 | 106 | } |
| 107 | - $this->containerBuilder->setAlias('mongo.connection', new Alias('mongo.connection.' . array_keys($connections)[0], true)); |
|
| 107 | + $this->containerBuilder->setAlias('mongo.connection', new Alias('mongo.connection.'.array_keys($connections)[0], true)); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | private function attachDataCollectionListenerToEventManager() |
@@ -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 | } |
@@ -55,9 +55,9 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function execute(Query $query, string $verbosity = self::VERBOSITY_ALL_PLAN_EXECUTION): Cursor |
| 57 | 57 | { |
| 58 | - if (! \in_array($query->getMethod(), self::$acceptedMethods)) { |
|
| 58 | + if (!\in_array($query->getMethod(), self::$acceptedMethods)) { |
|
| 59 | 59 | throw new \InvalidArgumentException( |
| 60 | - 'Cannot explain the method \'' . $query->getMethod() . '\'. Allowed methods: ' . implode(', ', self::$acceptedMethods) |
|
| 60 | + 'Cannot explain the method \''.$query->getMethod().'\'. Allowed methods: '.implode(', ', self::$acceptedMethods) |
|
| 61 | 61 | ); |
| 62 | 62 | }; |
| 63 | 63 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $this |
| 21 | 21 | ->setName('mongodb:collection:drop') |
| 22 | 22 | ->addArgument('collection', InputArgument::REQUIRED, 'collection to drop') |
| 23 | - ->setDescription('Drops a database');; |
|
| 23 | + ->setDescription('Drops a database'); ; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |