@@ -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 | } |