@@ -97,7 +97,7 @@ |
||
97 | 97 | return 'mongodb://'.implode( |
98 | 98 | ',', |
99 | 99 | array_map( |
100 | - function (array $host) { |
|
100 | + function(array $host) { |
|
101 | 101 | return sprintf('%s:%d', $host['host'], $host['port']); |
102 | 102 | }, |
103 | 103 | $hosts |
@@ -104,7 +104,7 @@ |
||
104 | 104 | { |
105 | 105 | return array_filter( |
106 | 106 | $options, |
107 | - function ($value) { |
|
107 | + function($value) { |
|
108 | 108 | return !empty($value) || \is_int($value) || \is_bool($value) || \is_float($value); |
109 | 109 | } |
110 | 110 | ); |
@@ -73,7 +73,7 @@ |
||
73 | 73 | ->defaultValue('primaryPreferred') |
74 | 74 | ->validate() |
75 | 75 | ->ifNotInArray(self::READ_PREFERENCE_VALID_OPTIONS) |
76 | - ->thenInvalid('Invalid readPreference option %s, must be one of [' . implode(', ', self::READ_PREFERENCE_VALID_OPTIONS) . ']'); |
|
76 | + ->thenInvalid('Invalid readPreference option %s, must be one of ['.implode(', ', self::READ_PREFERENCE_VALID_OPTIONS).']'); |
|
77 | 77 | |
78 | 78 | $clientsBuilder |
79 | 79 | ->scalarNode('replicaSet') |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Facile\MongoDbBundle\DependencyInjection; |
4 | 4 | |
5 | -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
6 | 5 | use Symfony\Component\Config\Definition\Builder\NodeBuilder; |
7 | 6 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
8 | 7 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this |
29 | 29 | ->setName('mongodb:fixtures:load') |
30 | 30 | ->addArgument('addFixturesPath', InputArgument::OPTIONAL, 'Add a path to search in for fixtures files') |
31 | - ->setDescription('Load fixtures and applies them');; |
|
31 | + ->setDescription('Load fixtures and applies them'); ; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | protected function initialize(InputInterface $input, OutputInterface $output) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $fixtures = $this->loader->getLoadedClasses(); |
54 | 54 | if (empty($fixtures)) { |
55 | 55 | throw new \InvalidArgumentException( |
56 | - sprintf('Could not find any class to load in: %s', "\n\n- " . implode("\n- ", $paths)) |
|
56 | + sprintf('Could not find any class to load in: %s', "\n\n- ".implode("\n- ", $paths)) |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | $indexList->loadData(); |
73 | 73 | $indexList->loadIndexes(); |
74 | - $this->io->writeln('Loaded fixture: ' . \get_class($indexList)); |
|
74 | + $this->io->writeln('Loaded fixture: '.\get_class($indexList)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | private function prepareSearchPaths(InputInterface $input, KernelInterface $kernel): array |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | foreach ($kernel->getBundles() as $bundle) { |
86 | - $paths[] = $bundle->getPath() . '/DataFixtures/Mongo'; |
|
86 | + $paths[] = $bundle->getPath().'/DataFixtures/Mongo'; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | return $paths; |
@@ -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 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | ]; |
26 | 26 | |
27 | 27 | /** |
28 | - * @return \Twig_SimpleFunction[] |
|
28 | + * @return TwigFunction[] |
|
29 | 29 | */ |
30 | 30 | public function getFunctions() |
31 | 31 | { |
@@ -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 |
@@ -60,10 +60,10 @@ |
||
60 | 60 | $connectionName = 'mongo.connection'; |
61 | 61 | |
62 | 62 | if ($input->getOption('connection')) { |
63 | - $connectionName .= '.' . $input->getOption('connection'); |
|
63 | + $connectionName .= '.'.$input->getOption('connection'); |
|
64 | 64 | } |
65 | 65 | |
66 | - if (! $this->container->has($connectionName)) { |
|
66 | + if (!$this->container->has($connectionName)) { |
|
67 | 67 | throw new \LogicException(sprintf('No connection named \'%s\' found', $input->getOption('connection'))); |
68 | 68 | } |
69 | 69 |