Passed
Push — master ( 8abef8...fa066b )
by Alex
04:33
created
src/MetadataManager.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         if (!$this->V3Edmx->isOK($msg)) {
31 31
             throw new \Exception($msg);
32 32
         }
33
-        $ymlDir = __DIR__ . DIRECTORY_SEPARATOR . "MetadataV3" . DIRECTORY_SEPARATOR . "JMSmetadata";
33
+        $ymlDir = __DIR__.DIRECTORY_SEPARATOR."MetadataV3".DIRECTORY_SEPARATOR."JMSmetadata";
34 34
         $this->serializer =
35 35
             SerializerBuilder::create()
36 36
                 ->addMetadataDir($ymlDir)
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         if (0 == strlen(trim($namespace))) {
66 66
             $entityTypeName = $NewEntity->getName();
67 67
         } else {
68
-            $entityTypeName = $namespace . "." . $NewEntity->getName();
68
+            $entityTypeName = $namespace.".".$NewEntity->getName();
69 69
         }
70 70
         $entitySet->setEntityType($entityTypeName);
71 71
         $entitySet->setGetterAccess($accessType);
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
         $last_letter = strtolower($singular[strlen($singular) - 1]);
107 107
         switch ($last_letter) {
108 108
             case 'y':
109
-                return substr($singular, 0, -1) . 'ies';
109
+                return substr($singular, 0, -1).'ies';
110 110
             case 's':
111
-                return $singular . 'es';
111
+                return $singular.'es';
112 112
             default:
113
-                return $singular . 's';
113
+                return $singular.'s';
114 114
         }
115 115
     }
116 116
 
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
         $this->startEdmxTransaction();
186 186
         $principalEntitySetName = $this->pluralize(2, $principalType->getName());
187 187
         $dependentEntitySetName = $this->pluralize(2, $dependentType->getName());
188
-        $relationName = $principalType->getName() . "_" . $principalProperty . "_"
189
-                        . $dependentType->getName() . "_" . $dependentProperty;
188
+        $relationName = $principalType->getName()."_".$principalProperty."_"
189
+                        . $dependentType->getName()."_".$dependentProperty;
190 190
         $relationName = trim($relationName, "_");
191 191
 
192 192
         $namespace = $this->V3Edmx->getDataServices()[0]->getNamespace();
193 193
         if (0 == strlen(trim($namespace))) {
194 194
             $relationFQName = $relationName;
195 195
         } else {
196
-            $relationFQName = $namespace . "." . $relationName;
196
+            $relationFQName = $namespace.".".$relationName;
197 197
         }
198 198
 
199 199
         $principalNavigationProperty = new TNavigationPropertyType();
200 200
         $principalNavigationProperty->setName($principalProperty);
201
-        $principalNavigationProperty->setToRole($dependentEntitySetName . "_" . $dependentProperty);
202
-        $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty);
201
+        $principalNavigationProperty->setToRole($dependentEntitySetName."_".$dependentProperty);
202
+        $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty);
203 203
         $principalNavigationProperty->setRelationship($relationFQName);
204 204
         $principalNavigationProperty->setGetterAccess($principalGetterAccess);
205 205
         $principalNavigationProperty->setSetterAccess($principalSetterAccess);
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
         if (!empty($dependentProperty)) {
216 216
             $dependentNavigationProperty = new TNavigationPropertyType();
217 217
             $dependentNavigationProperty->setName($dependentProperty);
218
-            $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty);
219
-            $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty);
218
+            $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty);
219
+            $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty);
220 220
             $dependentNavigationProperty->setRelationship($relationFQName);
221 221
             $dependentNavigationProperty->setGetterAccess($dependentGetterAccess);
222 222
             $dependentNavigationProperty->setSetterAccess($dependentSetterAccess);
@@ -287,8 +287,8 @@  discard block
 block discarded – undo
287 287
             $principalTypeFQName = $principalType->getName();
288 288
             $dependentTypeFQName = $dependentType->getName();
289 289
         } else {
290
-            $principalTypeFQName = $namespace . "." . $principalType->getName();
291
-            $dependentTypeFQName = $namespace . "." . $dependentType->getName();
290
+            $principalTypeFQName = $namespace.".".$principalType->getName();
291
+            $dependentTypeFQName = $namespace.".".$dependentType->getName();
292 292
         }
293 293
         $association = new TAssociationType();
294 294
         $relationship = $principalNavigationProperty->getRelationship();
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         if (0 == strlen(trim($namespace))) {
355 355
             $associationSetName = $association->getName();
356 356
         } else {
357
-            $associationSetName = $namespace . "." . $association->getName();
357
+            $associationSetName = $namespace.".".$association->getName();
358 358
         }
359 359
         $as->setAssociation($associationSetName);
360 360
         $end1 = new EndAnonymousType();
Please login to merge, or discard this patch.
src/MetadataV3/edm/TSchemaType.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 die($this->getNamespace());
150 150
                 return false;
151 151
             }*/
152
-            $eSetType = str_replace($this->getNamespace() . ".", "", $eSetType);
152
+            $eSetType = str_replace($this->getNamespace().".", "", $eSetType);
153 153
             if (!in_array($eSetType, $entityTypeNames)) {
154 154
                 $msg = "entitySet Types should have a matching type name in entity Types";
155 155
                 return false;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         // Check Associations to associationSets
160 160
         if (count($associationSets) != count($associationNames)) {
161
-            $msg = "we have " . count($associationSets) . "association sets and " . count($associationNames)
161
+            $msg = "we have ".count($associationSets)."association sets and ".count($associationNames)
162 162
                    . " associations, they should be the same";
163 163
         }
164 164
         if (count($associationNames) * 2 < count($navigationProperties)) {
@@ -168,22 +168,22 @@  discard block
 block discarded – undo
168 168
 
169 169
         foreach ($associationNames as $associationName => $associationEnds) {
170 170
             if (!array_key_exists($associationName, $associationSets)) {
171
-                $msg = "association " . $associationName . " exists without matching associationSet";
171
+                $msg = "association ".$associationName." exists without matching associationSet";
172 172
                 return false;
173 173
             }
174 174
 
175 175
             if (!array_key_exists($associationName, $navigationProperties)) {
176
-                $msg = "association " . $associationName . " exists without matching Natvigation Property";
176
+                $msg = "association ".$associationName." exists without matching Natvigation Property";
177 177
                 return false;
178 178
             }
179 179
             $roles = [$associationEnds[0]->getRole(), $associationEnds[1]->getRole()];
180 180
             if (!in_array($associationSets[$associationName][0]->getRole(), $roles)) {
181
-                $msg = "association Set role " . $associationSets[$associationName][0]->getRole()
181
+                $msg = "association Set role ".$associationSets[$associationName][0]->getRole()
182 182
                        . "lacks a matching property in the attached association";
183 183
                 return false;
184 184
             }
185 185
             if (!in_array($associationSets[$associationName][1]->getRole(), $roles)) {
186
-                $msg = "association Set role " . $associationSets[$associationName][1]->getRole()
186
+                $msg = "association Set role ".$associationSets[$associationName][1]->getRole()
187 187
                        . "lacks a matching property in the attached association";
188 188
                 return false;
189 189
             }
Please login to merge, or discard this patch.