Failed Conditions
Pull Request — master (#299)
by
unknown
02:45
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.
DependencyInjection/DoctrineMigrationsExtension.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $config = $this->processConfiguration($configuration, $configs);
34 34
 
35
-        $locator = new FileLocator(__DIR__ . '/../Resources/config/');
35
+        $locator = new FileLocator(__DIR__.'/../Resources/config/');
36 36
         $loader  = new XmlFileLoader($container, $locator);
37 37
 
38 38
         $loader->load('services.xml');
@@ -66,26 +66,26 @@  discard block
 block discarded – undo
66 66
             $diDefinition->addMethodCall('setService', [$doctrineId, new Reference($symfonyId)]);
67 67
         }
68 68
 
69
-        if (! isset($config['services'][MetadataStorage::class])) {
69
+        if (!isset($config['services'][MetadataStorage::class])) {
70 70
             $storageConfiguration = $config['storage']['table_storage'];
71 71
 
72 72
             $storageDefinition = new Definition(TableMetadataStorageConfiguration::class);
73 73
             $container->setDefinition('doctrine.migrations.storage.table_storage', $storageDefinition);
74 74
             $container->setAlias('doctrine.migrations.metadata_storage', 'doctrine.migrations.storage.table_storage');
75 75
 
76
-            if ($storageConfiguration['table_name']!== null) {
76
+            if ($storageConfiguration['table_name'] !== null) {
77 77
                 $storageDefinition->addMethodCall('setTableName', [$storageConfiguration['table_name']]);
78 78
             }
79
-            if ($storageConfiguration['version_column_name']!== null) {
79
+            if ($storageConfiguration['version_column_name'] !== null) {
80 80
                 $storageDefinition->addMethodCall('setVersionColumnName', [$storageConfiguration['version_column_name']]);
81 81
             }
82
-            if ($storageConfiguration['version_column_length']!== null) {
82
+            if ($storageConfiguration['version_column_length'] !== null) {
83 83
                 $storageDefinition->addMethodCall('setVersionColumnLength', [$storageConfiguration['version_column_length']]);
84 84
             }
85
-            if ($storageConfiguration['executed_at_column_name']!== null) {
85
+            if ($storageConfiguration['executed_at_column_name'] !== null) {
86 86
                 $storageDefinition->addMethodCall('setExecutedAtColumnName', [$storageConfiguration['executed_at_column_name']]);
87 87
             }
88
-            if ($storageConfiguration['execution_time_column_name']!== null) {
88
+            if ($storageConfiguration['execution_time_column_name'] !== null) {
89 89
                 $storageDefinition->addMethodCall('setExecutionTimeColumnName', [$storageConfiguration['execution_time_column_name']]);
90 90
             }
91 91
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function getXsdValidationBasePath() : string
125 125
     {
126
-        return __DIR__ . '/../Resources/config/schema';
126
+        return __DIR__.'/../Resources/config/schema';
127 127
     }
128 128
 
129 129
     public function getNamespace() : string
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $container->setAlias('doctrine.migrations.configuration.test', new Alias('doctrine.migrations.configuration', true));
43 43
 
44
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Fixtures'));
44
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Fixtures'));
45 45
         $loader->load('conf.xml');
46 46
 
47 47
         $container->compile();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function testCustomSorter() : void
132 132
     {
133
-        $config    = [
133
+        $config = [
134 134
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
135 135
             'services' => [Comparator::class => 'my_sorter'],
136 136
         ];
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $conn = $this->createMock(Connection::class);
140 140
         $container->set('doctrine.dbal.default_connection', $conn);
141 141
 
142
-        $sorter = new class() implements Comparator{
142
+        $sorter = new class() implements Comparator {
143 143
             public function compare(Version $a, Version $b) : int
144 144
             {
145 145
             }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
     public function testCustomConnection() : void
157 157
     {
158
-        $config    = [
158
+        $config = [
159 159
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
160 160
             'connection' => 'custom',
161 161
         ];
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
     public function testCustomEntityManager() : void
194 194
     {
195
-        $config    = [
195
+        $config = [
196 196
             'em' => 'custom',
197 197
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
198 198
         ];
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $this->expectException(InvalidConfigurationException::class);
242 242
         $this->expectExceptionMessage('Invalid configuration for path "doctrine_migrations.services": Valid services for the DoctrineMigrationsBundle must be in the "Doctrine\Migrations" namespace.');
243 243
 
244
-        $config    = [
244
+        $config = [
245 245
             'migrations_paths' => ['DoctrineMigrationsTest' => 'a'],
246 246
             'services' => ['foo' => 'mock_storage_service'],
247 247
         ];
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             'kernel.bundles' => [],
297 297
             'kernel.cache_dir' => sys_get_temp_dir(),
298 298
             'kernel.environment' => 'test',
299
-            'kernel.project_dir' => __DIR__ . '/../',
299
+            'kernel.project_dir' => __DIR__.'/../',
300 300
         ]));
301 301
     }
302 302
 }
Please login to merge, or discard this patch.