Passed
Pull Request — 2.7 (#7875)
by Luís
07:27
created
lib/Doctrine/ORM/Tools/SchemaTool.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                             $targetEntity = current(
227 227
                                 array_filter(
228 228
                                     $classes,
229
-                                    function (ClassMetadata $class) use ($idMapping) : bool {
229
+                                    function(ClassMetadata $class) use ($idMapping) : bool {
230 230
                                         return $class->name === $idMapping['targetEntity'];
231 231
                                     }
232 232
                                 )
@@ -646,8 +646,8 @@  discard block
 block discarded – undo
646 646
 
647 647
             if ( ! $definingClass) {
648 648
                 throw new \Doctrine\ORM\ORMException(
649
-                    'Column name `' . $joinColumn['referencedColumnName'] . '` referenced for relation from '
650
-                    . $mapping['sourceEntity'] . ' towards ' . $mapping['targetEntity'] . ' does not exist.'
649
+                    'Column name `'.$joinColumn['referencedColumnName'].'` referenced for relation from '
650
+                    . $mapping['sourceEntity'].' towards '.$mapping['targetEntity'].' does not exist.'
651 651
                 );
652 652
             }
653 653
 
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
      */
743 743
     private function gatherColumnOptions(array $mapping) : array
744 744
     {
745
-        if (! isset($mapping['options'])) {
745
+        if ( ! isset($mapping['options'])) {
746 746
             return [];
747 747
         }
748 748
 
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
                 if ($table->hasPrimaryKey()) {
849 849
                     $columns = $table->getPrimaryKey()->getColumns();
850 850
                     if (count($columns) == 1) {
851
-                        $checkSequence = $table->getName() . '_' . $columns[0] . '_seq';
851
+                        $checkSequence = $table->getName().'_'.$columns[0].'_seq';
852 852
                         if ($fullSchema->hasSequence($checkSequence)) {
853 853
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
854 854
                         }
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
         }
923 923
 
924 924
         // whitelist assets we already know about in $toSchema, use the existing filter otherwise
925
-        $config->setSchemaAssetsFilter(static function ($asset) use ($previousFilter, $toSchema) : bool {
925
+        $config->setSchemaAssetsFilter(static function($asset) use ($previousFilter, $toSchema) : bool {
926 926
             $assetName = $asset instanceof AbstractAsset ? $asset->getName() : $asset;
927 927
 
928 928
             return $toSchema->hasTable($assetName) || $toSchema->hasSequence($assetName) || $previousFilter($asset);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7875Test.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     private function filterCreateTable(array $sqls, string $tableName) : array
40 40
     {
41
-        return array_filter($sqls, static function (string $sql) use ($tableName) : bool {
41
+        return array_filter($sqls, static function(string $sql) use ($tableName) : bool {
42 42
             return strpos($sql, sprintf('CREATE TABLE %s (', $tableName)) === 0;
43 43
         });
44 44
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $this->_em->getConnection()->exec(current($sqls));
56 56
 
57
-        $sqls = array_filter($tool->getUpdateSchemaSql($classes), static function (string $sql) : bool {
57
+        $sqls = array_filter($tool->getUpdateSchemaSql($classes), static function(string $sql) : bool {
58 58
             return strpos($sql, ' gh7875_my_entity ') !== false;
59 59
         });
60 60
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             ['/^(?!my_enti)/', null],
78 78
             [
79 79
                 null,
80
-                static function ($assetName) : bool {
80
+                static function($assetName) : bool {
81 81
                     return $assetName !== 'gh7875_my_entity';
82 82
                 },
83 83
             ],
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $previousFilter = $config->getSchemaAssetsFilter();
107 107
 
108 108
         $sqls = $tool->getUpdateSchemaSql($classes);
109
-        $sqls = array_filter($sqls, static function (string $sql) : bool {
109
+        $sqls = array_filter($sqls, static function(string $sql) : bool {
110 110
             return strpos($sql, ' gh7875_my_entity ') !== false;
111 111
         });
112 112
 
Please login to merge, or discard this patch.