Failed Conditions
Pull Request — master (#318)
by Asmir
03:21
created
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.