Failed Conditions
Pull Request — master (#318)
by Asmir
03:21
created
DependencyInjection/Configuration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
                     ->useAttributeAsKey('service')
63 63
                     ->defaultValue([])
64 64
                     ->validate()
65
-                        ->ifTrue(static function ($v) {
66
-                            return count(array_filter(array_keys($v), static function (string $doctrineService) : bool {
67
-                                return strpos($doctrineService, 'Doctrine\Migrations\\') !==0;
65
+                        ->ifTrue(static function($v) {
66
+                            return count(array_filter(array_keys($v), static function(string $doctrineService) : bool {
67
+                                return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0;
68 68
                             }));
69 69
                         })
70 70
                         ->thenInvalid('Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.')
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                     ->defaultValue(false)
124 124
                     ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false')
125 125
                     ->validate()
126
-                        ->ifTrue(static function ($v) use ($organizeMigrationModes) {
126
+                        ->ifTrue(static function($v) use ($organizeMigrationModes) {
127 127
                             if ($v === false) {
128 128
                                 return false;
129 129
                             }
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
                     ->end()
139 139
                     ->validate()
140 140
                         ->ifString()
141
-                            ->then(static function ($v) {
142
-                                return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v));
141
+                            ->then(static function($v) {
142
+                                return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v));
143 143
                             })
144 144
                     ->end()
145 145
                 ->end()
Please login to merge, or discard this patch.
Tests/DependencyInjection/DoctrineCommandsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
             'kernel.bundles' => [],
90 90
             'kernel.cache_dir' => sys_get_temp_dir(),
91 91
             'kernel.environment' => 'test',
92
-            'kernel.project_dir' => __DIR__ . '/../',
92
+            'kernel.project_dir' => __DIR__.'/../',
93 93
         ]));
94 94
 
95 95
         $kernel      = $this->getKernel($container);
Please login to merge, or discard this patch.
DoctrineMigrationsBundle.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,6 @@
 block discarded – undo
17 17
 {
18 18
     public function build(ContainerBuilder $builder)
19 19
     {
20
-      $builder->addCompilerPass(new ConfigureDependencyFactoryPass());
20
+        $builder->addCompilerPass(new ConfigureDependencyFactoryPass());
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $container->setAlias('doctrine.migrations.configuration.test', new Alias('doctrine.migrations.configuration', true));
46 46
 
47
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Fixtures'));
47
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Fixtures'));
48 48
         $loader->load('conf.xml');
49 49
 
50 50
         $container->compile();
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $ref = new ReflectionClass(TestBundle::class);
125 125
         self::assertSame([
126 126
             'DoctrineMigrationsTest' => dirname($ref->getFileName()),
127
-            'DoctrineMigrationsTestAnother' => dirname($ref->getFileName()) . '/another-path',
127
+            'DoctrineMigrationsTestAnother' => dirname($ref->getFileName()).'/another-path',
128 128
 
129 129
         ], $config->getMigrationDirectories());
130 130
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
     public function testCustomSorter() : void
157 157
     {
158
-        $config    = [
158
+        $config = [
159 159
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
160 160
             'services' => [Comparator::class => 'my_sorter'],
161 161
         ];
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $conn = $this->createMock(Connection::class);
165 165
         $container->set('doctrine.dbal.default_connection', $conn);
166 166
 
167
-        $sorter = new class() implements Comparator{
167
+        $sorter = new class() implements Comparator {
168 168
             public function compare(Version $a, Version $b) : int
169 169
             {
170 170
             }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
     public function testCustomConnection() : void
182 182
     {
183
-        $config    = [
183
+        $config = [
184 184
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
185 185
             'connection' => 'custom',
186 186
         ];
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
     public function testCustomEntityManager() : void
219 219
     {
220
-        $config    = [
220
+        $config = [
221 221
             'em' => 'custom',
222 222
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
223 223
         ];
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $this->expectException(InvalidConfigurationException::class);
267 267
         $this->expectExceptionMessage('Invalid configuration for path "doctrine_migrations.services": Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.');
268 268
 
269
-        $config    = [
269
+        $config = [
270 270
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
271 271
             'services' => ['foo' => 'mock_storage_service'],
272 272
         ];
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
             'kernel.bundles' => ['TestBundle' => TestBundle::class],
322 322
             'kernel.cache_dir' => sys_get_temp_dir(),
323 323
             'kernel.environment' => 'test',
324
-            'kernel.project_dir' => __DIR__ . '/../',
324
+            'kernel.project_dir' => __DIR__.'/../',
325 325
         ]));
326 326
     }
327 327
 }
Please login to merge, or discard this patch.
DependencyInjection/DoctrineMigrationsExtension.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $config = $this->processConfiguration($configuration, $configs);
41 41
 
42
-        $locator = new FileLocator(__DIR__ . '/../Resources/config/');
42
+        $locator = new FileLocator(__DIR__.'/../Resources/config/');
43 43
         $loader  = new XmlFileLoader($container, $locator);
44 44
 
45 45
         $loader->load('services.xml');
@@ -72,26 +72,26 @@  discard block
 block discarded – undo
72 72
             $diDefinition->addMethodCall('setService', [$doctrineId, new Reference($symfonyId)]);
73 73
         }
74 74
 
75
-        if (! isset($config['services'][MetadataStorage::class])) {
75
+        if (!isset($config['services'][MetadataStorage::class])) {
76 76
             $storageConfiguration = $config['storage']['table_storage'];
77 77
 
78 78
             $storageDefinition = new Definition(TableMetadataStorageConfiguration::class);
79 79
             $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition);
80 80
             $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage');
81 81
 
82
-            if ($storageConfiguration['table_name']!== null) {
82
+            if ($storageConfiguration['table_name'] !== null) {
83 83
                 $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]);
84 84
             }
85
-            if ($storageConfiguration['version_column_name']!== null) {
85
+            if ($storageConfiguration['version_column_name'] !== null) {
86 86
                 $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]);
87 87
             }
88
-            if ($storageConfiguration['version_column_length']!== null) {
88
+            if ($storageConfiguration['version_column_length'] !== null) {
89 89
                 $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]);
90 90
             }
91
-            if ($storageConfiguration['executed_at_column_name']!== null) {
91
+            if ($storageConfiguration['executed_at_column_name'] !== null) {
92 92
                 $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]);
93 93
             }
94
-            if ($storageConfiguration['execution_time_column_name']!== null) {
94
+            if ($storageConfiguration['execution_time_column_name'] !== null) {
95 95
                 $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]);
96 96
             }
97 97
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $bundleName = substr($pathParts[0], 1);
116 116
 
117 117
             $bundles = $container->getParameter('kernel.bundles');
118
-            if (! isset($bundles[$bundleName])) {
118
+            if (!isset($bundles[$bundleName])) {
119 119
                 throw new RuntimeException(sprintf(
120 120
                     'The bundle "%s" has not been registered with AppKernel. Available bundles: %s',
121 121
                     $bundleName,
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             }
125 125
 
126 126
             $ref = new ReflectionClass($bundles[$bundleName]);
127
-            return dirname($ref->getFileName()) . substr($path, strlen('@' . $bundleName));
127
+            return dirname($ref->getFileName()).substr($path, strlen('@'.$bundleName));
128 128
         }
129 129
 
130 130
         return $path;
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function getXsdValidationBasePath() : string
138 138
     {
139
-        return __DIR__ . '/../Resources/config/schema';
139
+        return __DIR__.'/../Resources/config/schema';
140 140
     }
141 141
 
142 142
     public function getNamespace() : string
Please login to merge, or discard this patch.