Completed
Pull Request — master (#228)
by Jonathan
10:18 queued 02:20
created
Category
Command/Helper/DoctrineCommandHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $connection = $dbHelper->getConnection();
46 46
 
47
-        if (! $connection instanceof PoolingShardConnection) {
47
+        if (!$connection instanceof PoolingShardConnection) {
48 48
             if (count($managerNames) === 0) {
49 49
                 throw new LogicException(sprintf(
50 50
                     "Connection '%s' must implement shards configuration.",
Please login to merge, or discard this patch.
Command/DoctrineCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         if ($dir === null) {
31 31
             $dir = $container->getParameter('doctrine_migrations.dir_name');
32 32
 
33
-            if (! is_dir($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
33
+            if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) {
34 34
                 $error = error_get_last();
35 35
                 throw new \ErrorException($error['message']);
36 36
             }
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
             $pathPlaceholderArray = ['kernel.root_dir', 'kernel.cache_dir', 'kernel.logs_dir'];
42 42
 
43 43
             foreach ($pathPlaceholderArray as $pathPlaceholder) {
44
-                if (! $container->hasParameter($pathPlaceholder) || ! preg_match('/\%' . $pathPlaceholder . '\%/', $dir)) {
44
+                if (!$container->hasParameter($pathPlaceholder) || !preg_match('/\%'.$pathPlaceholder.'\%/', $dir)) {
45 45
                     continue;
46 46
                 }
47 47
 
48
-                $dir = str_replace('%' . $pathPlaceholder . '%', $container->getParameter($pathPlaceholder), $dir);
48
+                $dir = str_replace('%'.$pathPlaceholder.'%', $container->getParameter($pathPlaceholder), $dir);
49 49
             }
50 50
 
51
-            if (! is_dir($dir) && ! @mkdir($dir, 0777, true) && ! is_dir($dir)) {
51
+            if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) {
52 52
                 $error = error_get_last();
53 53
                 throw new \ErrorException($error['message']);
54 54
             }
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
         }
66 66
 
67 67
         // For backward compatibility, need use a table from parameters for overwrite the default configuration
68
-        if (! ($configuration instanceof AbstractFileConfiguration) || $configuration->getMigrationsTableName() === '') {
68
+        if (!($configuration instanceof AbstractFileConfiguration) || $configuration->getMigrationsTableName() === '') {
69 69
             $configuration->setMigrationsTableName($container->getParameter('doctrine_migrations.table_name'));
70 70
         }
71 71
 
72 72
         // Migrations is not register from configuration loader
73
-        if (! ($configuration instanceof AbstractFileConfiguration)) {
73
+        if (!($configuration instanceof AbstractFileConfiguration)) {
74 74
             $migrationsDirectory = $configuration->getMigrationsDirectory();
75 75
 
76 76
             if ($migrationsDirectory !== null) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         foreach ($versions as $version) {
114 114
             $migration = $version->getMigration();
115
-            if (! ($migration instanceof ContainerAwareInterface)) {
115
+            if (!($migration instanceof ContainerAwareInterface)) {
116 116
                 continue;
117 117
             }
118 118
 
Please login to merge, or discard this patch.
DependencyInjection/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 ->scalarNode('organize_migrations')->defaultValue(false)
42 42
                     ->info('Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false')
43 43
                     ->validate()
44
-                        ->ifTrue(function ($v) use ($organizeMigrationModes) {
44
+                        ->ifTrue(function($v) use ($organizeMigrationModes) {
45 45
                             if ($v === false) {
46 46
                                 return false;
47 47
                             }
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
                     ->end()
57 57
                     ->validate()
58 58
                         ->ifString()
59
-                            ->then(function ($v) {
60
-                                return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_' . strtoupper($v));
59
+                            ->then(function($v) {
60
+                                return constant('Doctrine\Migrations\Configuration\Configuration::VERSIONS_ORGANIZATION_'.strtoupper($v));
61 61
                             })
62 62
                         ->end()
63 63
                     ->end()
Please login to merge, or discard this patch.
DependencyInjection/DoctrineMigrationsExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
         $config = $this->processConfiguration($configuration, $configs);
27 27
 
28 28
         foreach ($config as $key => $value) {
29
-            $container->setParameter($this->getAlias() . '.' . $key, $value);
29
+            $container->setParameter($this->getAlias().'.'.$key, $value);
30 30
         }
31 31
 
32
-        $locator = new FileLocator(__DIR__ . '/../Resources/config/');
32
+        $locator = new FileLocator(__DIR__.'/../Resources/config/');
33 33
         $loader  = new XmlFileLoader($container, $locator);
34 34
 
35 35
         $loader->load('services.xml');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function getXsdValidationBasePath() : string
44 44
     {
45
-        return __DIR__ . '/../Resources/config/schema';
45
+        return __DIR__.'/../Resources/config/schema';
46 46
     }
47 47
 
48 48
     public function getNamespace() : string
Please login to merge, or discard this patch.
Tests/Command/DoctrineCommandTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
         $configurationMock->expects($this->once())
25 25
             ->method('setMigrationsDirectory')
26
-            ->with(__DIR__ . '/../../');
26
+            ->with(__DIR__.'/../../');
27 27
 
28 28
         $configurationMock->expects($this->once())
29 29
             ->method('setMigrationsNamespace')
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     private function getContainer() : ContainerBuilder
48 48
     {
49 49
         return new ContainerBuilder(new ParameterBag([
50
-            'doctrine_migrations.dir_name' => __DIR__ . '/../../',
50
+            'doctrine_migrations.dir_name' => __DIR__.'/../../',
51 51
             'doctrine_migrations.namespace' => 'test',
52 52
             'doctrine_migrations.name' => 'test',
53 53
             'doctrine_migrations.table_name' => 'test',
Please login to merge, or discard this patch.
Tests/DependencyInjection/DoctrineMigrationsExtensionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             'kernel.bundles' => [],
33 33
             'kernel.cache_dir' => sys_get_temp_dir(),
34 34
             'kernel.environment' => 'test',
35
-            'kernel.root_dir' => __DIR__ . '/../../', // src dir
35
+            'kernel.root_dir' => __DIR__.'/../../', // src dir
36 36
         ]));
37 37
     }
38 38
 }
Please login to merge, or discard this patch.