Completed
Push — master ( 499890...58d34e )
by Christopher
04:41
created
src/MetadataManager.php 1 patch
Spacing   +14 added lines, -14 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,20 +185,20 @@  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 . "_" . $dependentType->getName() . "_" . $dependentProperty;
188
+        $relationName = $principalType->getName()."_".$principalProperty."_".$dependentType->getName()."_".$dependentProperty;
189 189
         $relationName = trim($relationName, "_");
190 190
 
191 191
         $namespace = $this->V3Edmx->getDataServices()[0]->getNamespace();
192 192
         if (0 == strlen(trim($namespace))) {
193 193
             $relationFQName = $relationName;
194 194
         } else {
195
-            $relationFQName = $namespace . "." . $relationName;
195
+            $relationFQName = $namespace.".".$relationName;
196 196
         }
197 197
 
198 198
         $principalNavigationProperty = new TNavigationPropertyType();
199 199
         $principalNavigationProperty->setName($principalProperty);
200
-        $principalNavigationProperty->setToRole($dependentEntitySetName . "_" . $dependentProperty);
201
-        $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty);
200
+        $principalNavigationProperty->setToRole($dependentEntitySetName."_".$dependentProperty);
201
+        $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty);
202 202
         $principalNavigationProperty->setRelationship($relationFQName);
203 203
         $principalNavigationProperty->setGetterAccess($principalGetterAccess);
204 204
         $principalNavigationProperty->setSetterAccess($principalSetterAccess);
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
         if (!empty($dependentProperty)) {
215 215
             $dependentNavigationProperty = new TNavigationPropertyType();
216 216
             $dependentNavigationProperty->setName($dependentProperty);
217
-            $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty);
218
-            $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty);
217
+            $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty);
218
+            $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty);
219 219
             $dependentNavigationProperty->setRelationship($relationFQName);
220 220
             $dependentNavigationProperty->setGetterAccess($dependentGetterAccess);
221 221
             $dependentNavigationProperty->setSetterAccess($dependentSetterAccess);
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
             $principalTypeFQName = $principalType->getName();
287 287
             $dependentTypeFQName = $dependentType->getName();
288 288
         } else {
289
-            $principalTypeFQName = $namespace . "." . $principalType->getName();
290
-            $dependentTypeFQName = $namespace . "." . $dependentType->getName();
289
+            $principalTypeFQName = $namespace.".".$principalType->getName();
290
+            $dependentTypeFQName = $namespace.".".$dependentType->getName();
291 291
         }
292 292
         $association = new TAssociationType();
293 293
         $association->setName($principalNavigationProperty->getRelationship());
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         if (0 == strlen(trim($namespace))) {
340 340
             $associationSetName = $association->getName();
341 341
         } else {
342
-            $associationSetName = $namespace . "." . $association->getName();
342
+            $associationSetName = $namespace.".".$association->getName();
343 343
         }
344 344
         $as->setAssociation($associationSetName);
345 345
         $end1 = new EndAnonymousType();
Please login to merge, or discard this patch.