Passed
Push — master ( c18183...2de6c8 )
by Michael
11:46
created
lib/Doctrine/ORM/Tools/SchemaValidator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools;
6 6
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $ce = [];
71 71
 
72 72
         foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) {
73
-            if (! ($association instanceof AssociationMetadata)) {
73
+            if ( ! ($association instanceof AssociationMetadata)) {
74 74
                 continue;
75 75
             }
76 76
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
 
80 80
         foreach ($class->getSubClasses() as $subClass) {
81
-            if (! in_array($class->getClassName(), class_parents($subClass), true)) {
81
+            if ( ! in_array($class->getClassName(), class_parents($subClass), true)) {
82 82
                 $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance.";
83 83
 
84 84
                 $ce[] = sprintf($message, $subClass, $class->getClassName());
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $fieldName       = $association->getName();
98 98
         $targetEntity    = $association->getTargetEntity();
99 99
 
100
-        if (! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
100
+        if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
101 101
             $message = "The target entity '%s' specified on %s#%s is unknown or not an entity.";
102 102
 
103 103
             return [sprintf($message, $targetEntity, $class->getClassName(), $fieldName)];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
         /** @var ClassMetadata $targetMetadata */
118 118
         $targetMetadata    = $metadataFactory->getMetadataFor($targetEntity);
119
-        $containsForeignId = array_filter($targetMetadata->identifier, function ($identifier) use ($targetMetadata) {
119
+        $containsForeignId = array_filter($targetMetadata->identifier, function($identifier) use ($targetMetadata) {
120 120
             $targetProperty = $targetMetadata->getProperty($identifier);
121 121
 
122 122
             return $targetProperty instanceof AssociationMetadata;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             /** @var AssociationMetadata $targetAssociation */
133 133
             $targetAssociation = $targetMetadata->getProperty($mappedBy);
134 134
 
135
-            if (! $targetAssociation) {
135
+            if ( ! $targetAssociation) {
136 136
                 $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.';
137 137
 
138 138
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             /** @var AssociationMetadata $targetAssociation */
157 157
             $targetAssociation = $targetMetadata->getProperty($inversedBy);
158 158
 
159
-            if (! $targetAssociation) {
159
+            if ( ! $targetAssociation) {
160 160
                 $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.';
161 161
 
162 162
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                 $joinTable               = $association->getJoinTable();
201 201
 
202 202
                 foreach ($joinTable->getJoinColumns() as $joinColumn) {
203
-                    if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
203
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) {
204 204
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
205 205
 
206 206
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName());
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 }
210 210
 
211 211
                 foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
212
-                    if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
212
+                    if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) {
213 213
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
214 214
 
215 215
                         $ce[] = sprintf($message, $inverseJoinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
                 if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) {
221 221
                     $columnNames = array_map(
222
-                        function (JoinColumnMetadata $joinColumn) {
222
+                        function(JoinColumnMetadata $joinColumn) {
223 223
                             return $joinColumn->getReferencedColumnName();
224 224
                         },
225 225
                         $joinTable->getInverseJoinColumns()
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
                 if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) {
236 236
                     $columnNames = array_map(
237
-                        function (JoinColumnMetadata $joinColumn) {
237
+                        function(JoinColumnMetadata $joinColumn) {
238 238
                             return $joinColumn->getReferencedColumnName();
239 239
                         },
240 240
                         $joinTable->getJoinColumns()
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 $joinColumns       = $association->getJoinColumns();
252 252
 
253 253
                 foreach ($joinColumns as $joinColumn) {
254
-                    if (! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) {
254
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) {
255 255
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
256 256
 
257 257
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                     continue;
283 283
                 }
284 284
 
285
-                if (! ($targetProperty instanceof AssociationMetadata)) {
285
+                if ( ! ($targetProperty instanceof AssociationMetadata)) {
286 286
                     $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'.";
287 287
 
288 288
                     $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName());
Please login to merge, or discard this patch.