@@ -149,7 +149,7 @@ discard block |
||
| 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 |
||
| 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)) { |
@@ -167,33 +167,33 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | foreach ($associationNames as $associationName => $associationEnds) { |
| 169 | 169 | if (!array_key_exists($associationName, $associationSets)) { |
| 170 | - $msg = "association " . $associationName . " exists without matching associationSet"; |
|
| 170 | + $msg = "association ".$associationName." exists without matching associationSet"; |
|
| 171 | 171 | return false; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | if (!array_key_exists($associationName, $navigationProperties)) { |
| 175 | - $msg = "association " . $associationName . " exists without matching Natvigation Property"; |
|
| 175 | + $msg = "association ".$associationName." exists without matching Natvigation Property"; |
|
| 176 | 176 | return false; |
| 177 | 177 | } |
| 178 | 178 | $roles = [$associationEnds[0]->getRole(), $associationEnds[1]->getRole()]; |
| 179 | 179 | if (!in_array($associationSets[$associationName][0]->getRole(), $roles)) { |
| 180 | - $msg = "association Set role " . $associationSets[$associationName][0]->getRole() |
|
| 180 | + $msg = "association Set role ".$associationSets[$associationName][0]->getRole() |
|
| 181 | 181 | . "lacks a matching property in the attached association"; |
| 182 | 182 | return false; |
| 183 | 183 | } |
| 184 | 184 | if (!in_array($associationSets[$associationName][1]->getRole(), $roles)) { |
| 185 | - $msg = "association Set role " . $associationSets[$associationName][1]->getRole() |
|
| 185 | + $msg = "association Set role ".$associationSets[$associationName][1]->getRole() |
|
| 186 | 186 | . "lacks a matching property in the attached association"; |
| 187 | 187 | return false; |
| 188 | 188 | } |
| 189 | - foreach($navigationProperties[$associationName] as $navProp){ |
|
| 190 | - if (!in_array($navProp->getToRole(),$roles)) { |
|
| 191 | - $msg = "Navigation Property Role " . $navProp->getToRole() |
|
| 189 | + foreach ($navigationProperties[$associationName] as $navProp) { |
|
| 190 | + if (!in_array($navProp->getToRole(), $roles)) { |
|
| 191 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
| 192 | 192 | . " lacks a matching peroperty in the assocation"; |
| 193 | 193 | return false; |
| 194 | 194 | } |
| 195 | - if (!in_array($navProp->getFromRole(),$roles)) { |
|
| 196 | - $msg = "Navigation Property Role " .$navProp->getToRole() |
|
| 195 | + if (!in_array($navProp->getFromRole(), $roles)) { |
|
| 196 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
| 197 | 197 | . " lacks a matching peroperty in the assocation"; |
| 198 | 198 | return false; |
| 199 | 199 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 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) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if (0 == strlen(trim($namespace))) { |
| 68 | 68 | $entityTypeName = $NewEntity->getName(); |
| 69 | 69 | } else { |
| 70 | - $entityTypeName = $namespace . "." . $NewEntity->getName(); |
|
| 70 | + $entityTypeName = $namespace.".".$NewEntity->getName(); |
|
| 71 | 71 | } |
| 72 | 72 | $entitySet->setEntityType($entityTypeName); |
| 73 | 73 | $entitySet->setGetterAccess($accessType); |
@@ -108,11 +108,11 @@ discard block |
||
| 108 | 108 | $last_letter = strtolower($singular[strlen($singular) - 1]); |
| 109 | 109 | switch ($last_letter) { |
| 110 | 110 | case 'y': |
| 111 | - return substr($singular, 0, -1) . 'ies'; |
|
| 111 | + return substr($singular, 0, -1).'ies'; |
|
| 112 | 112 | case 's': |
| 113 | - return $singular . 'es'; |
|
| 113 | + return $singular.'es'; |
|
| 114 | 114 | default: |
| 115 | - return $singular . 's'; |
|
| 115 | + return $singular.'s'; |
|
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
@@ -187,21 +187,21 @@ discard block |
||
| 187 | 187 | $this->startEdmxTransaction(); |
| 188 | 188 | $principalEntitySetName = $this->pluralize(2, $principalType->getName()); |
| 189 | 189 | $dependentEntitySetName = $this->pluralize(2, $dependentType->getName()); |
| 190 | - $relationName = $principalType->getName() . "_" . $principalProperty . "_" |
|
| 191 | - . $dependentType->getName() . "_" . $dependentProperty; |
|
| 190 | + $relationName = $principalType->getName()."_".$principalProperty."_" |
|
| 191 | + . $dependentType->getName()."_".$dependentProperty; |
|
| 192 | 192 | $relationName = trim($relationName, "_"); |
| 193 | 193 | |
| 194 | 194 | $namespace = $this->V3Edmx->getDataServices()[0]->getNamespace(); |
| 195 | 195 | if (0 == strlen(trim($namespace))) { |
| 196 | 196 | $relationFQName = $relationName; |
| 197 | 197 | } else { |
| 198 | - $relationFQName = $namespace . "." . $relationName; |
|
| 198 | + $relationFQName = $namespace.".".$relationName; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | $principalNavigationProperty = new TNavigationPropertyType(); |
| 202 | 202 | $principalNavigationProperty->setName($principalProperty); |
| 203 | - $principalNavigationProperty->setToRole(trim($dependentEntitySetName . "_" . $dependentProperty,"_")); |
|
| 204 | - $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty); |
|
| 203 | + $principalNavigationProperty->setToRole(trim($dependentEntitySetName."_".$dependentProperty, "_")); |
|
| 204 | + $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty); |
|
| 205 | 205 | $principalNavigationProperty->setRelationship($relationFQName); |
| 206 | 206 | $principalNavigationProperty->setGetterAccess($principalGetterAccess); |
| 207 | 207 | $principalNavigationProperty->setSetterAccess($principalSetterAccess); |
@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | if (!empty($dependentProperty)) { |
| 217 | 217 | $dependentNavigationProperty = new TNavigationPropertyType(); |
| 218 | 218 | $dependentNavigationProperty->setName($dependentProperty); |
| 219 | - $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty); |
|
| 220 | - $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty); |
|
| 219 | + $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty); |
|
| 220 | + $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty); |
|
| 221 | 221 | $dependentNavigationProperty->setRelationship($relationFQName); |
| 222 | 222 | $dependentNavigationProperty->setGetterAccess($dependentGetterAccess); |
| 223 | 223 | $dependentNavigationProperty->setSetterAccess($dependentSetterAccess); |
@@ -287,8 +287,8 @@ discard block |
||
| 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(); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | if (0 == strlen(trim($namespace))) { |
| 357 | 357 | $associationSetName = $association->getName(); |
| 358 | 358 | } else { |
| 359 | - $associationSetName = $namespace . "." . $association->getName(); |
|
| 359 | + $associationSetName = $namespace.".".$association->getName(); |
|
| 360 | 360 | } |
| 361 | 361 | $as->setAssociation($associationSetName); |
| 362 | 362 | $end1 = new EndAnonymousType(); |