@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | /** |
94 | 94 | * isset returnType |
95 | 95 | * |
96 | - * @param scalar $index |
|
96 | + * @param integer $index |
|
97 | 97 | * @return boolean |
98 | 98 | */ |
99 | 99 | public function issetReturnType($index) |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * unset returnType |
106 | 106 | * |
107 | - * @param scalar $index |
|
107 | + * @param integer $index |
|
108 | 108 | * @return void |
109 | 109 | */ |
110 | 110 | public function unsetReturnType($index) |
@@ -52,6 +52,11 @@ discard block |
||
52 | 52 | return $cereal->serialize($this->getEdmx(), "xml"); |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param string $name |
|
57 | + * @param TTextType $summary |
|
58 | + * @param TTextType $longDescription |
|
59 | + */ |
|
55 | 60 | public function addEntityType($name, $accessType = "Public", $summary = null, $longDescription = null) |
56 | 61 | { |
57 | 62 | $NewEntity = new TEntityTypeType(); |
@@ -116,6 +121,14 @@ discard block |
||
116 | 121 | return $NewProperty; |
117 | 122 | } |
118 | 123 | |
124 | + /** |
|
125 | + * @param string $name |
|
126 | + * @param string $type |
|
127 | + * @param string $defaultValue |
|
128 | + * @param string $storeGeneratedPattern |
|
129 | + * @param TTextType $summary |
|
130 | + * @param TTextType $longDescription |
|
131 | + */ |
|
119 | 132 | public function addPropertyToEntityType( |
120 | 133 | TEntityTypeType $entityType, |
121 | 134 | $name, |
@@ -145,6 +158,11 @@ discard block |
||
145 | 158 | return $NewProperty; |
146 | 159 | } |
147 | 160 | |
161 | + /** |
|
162 | + * @param string $principalMultiplicity |
|
163 | + * @param string $principalProperty |
|
164 | + * @param string $dependentMultiplicity |
|
165 | + */ |
|
148 | 166 | public function addNavigationPropertyToEntityType( |
149 | 167 | TEntityTypeType $principalType, |
150 | 168 | $principalMultiplicity, |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $entitySet = new EntitySetAnonymousType(); |
62 | 62 | $entitySet->setName(Str::plural($NewEntity->getName())); |
63 | 63 | $namespace = $this->getNamespace(); |
64 | - $entityTypeName = $namespace . $NewEntity->getName(); |
|
64 | + $entityTypeName = $namespace.$NewEntity->getName(); |
|
65 | 65 | $entitySet->setEntityType($entityTypeName); |
66 | 66 | $entitySet->setGetterAccess($accessType); |
67 | 67 | |
@@ -165,17 +165,17 @@ discard block |
||
165 | 165 | ) { |
166 | 166 | $principalEntitySetName = Str::plural($principalType->getName()); |
167 | 167 | $dependentEntitySetName = Str::plural($dependentType->getName()); |
168 | - $relationName = $principalType->getName() . "_" . $principalProperty . "_" |
|
169 | - . $dependentType->getName() . "_" . $dependentProperty; |
|
168 | + $relationName = $principalType->getName()."_".$principalProperty."_" |
|
169 | + . $dependentType->getName()."_".$dependentProperty; |
|
170 | 170 | $relationName = trim($relationName, "_"); |
171 | 171 | |
172 | 172 | $namespace = $this->getNamespace(); |
173 | - $relationFQName = $namespace . $relationName; |
|
173 | + $relationFQName = $namespace.$relationName; |
|
174 | 174 | |
175 | 175 | $principalNavigationProperty = new TNavigationPropertyType(); |
176 | 176 | $principalNavigationProperty->setName($principalProperty); |
177 | - $principalNavigationProperty->setToRole(trim($dependentEntitySetName . "_" . $dependentProperty, "_")); |
|
178 | - $principalNavigationProperty->setFromRole($principalEntitySetName . "_" . $principalProperty); |
|
177 | + $principalNavigationProperty->setToRole(trim($dependentEntitySetName."_".$dependentProperty, "_")); |
|
178 | + $principalNavigationProperty->setFromRole($principalEntitySetName."_".$principalProperty); |
|
179 | 179 | $principalNavigationProperty->setRelationship($relationFQName); |
180 | 180 | $principalNavigationProperty->setGetterAccess($principalGetterAccess); |
181 | 181 | $principalNavigationProperty->setSetterAccess($principalSetterAccess); |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | if (!empty($dependentProperty)) { |
186 | 186 | $dependentNavigationProperty = new TNavigationPropertyType(); |
187 | 187 | $dependentNavigationProperty->setName($dependentProperty); |
188 | - $dependentNavigationProperty->setToRole($principalEntitySetName . "_" . $principalProperty); |
|
189 | - $dependentNavigationProperty->setFromRole($dependentEntitySetName . "_" . $dependentProperty); |
|
188 | + $dependentNavigationProperty->setToRole($principalEntitySetName."_".$principalProperty); |
|
189 | + $dependentNavigationProperty->setFromRole($dependentEntitySetName."_".$dependentProperty); |
|
190 | 190 | $dependentNavigationProperty->setRelationship($relationFQName); |
191 | 191 | $dependentNavigationProperty->setGetterAccess($dependentGetterAccess); |
192 | 192 | $dependentNavigationProperty->setSetterAccess($dependentSetterAccess); |
@@ -251,13 +251,13 @@ discard block |
||
251 | 251 | } |
252 | 252 | if (!in_array($dependentMultiplicity, $multCombo[$principalMultiplicity])) { |
253 | 253 | throw new \InvalidArgumentException( |
254 | - "Invalid multiplicity combination - " . $principalMultiplicity . ' ' . $dependentMultiplicity |
|
254 | + "Invalid multiplicity combination - ".$principalMultiplicity.' '.$dependentMultiplicity |
|
255 | 255 | ); |
256 | 256 | } |
257 | 257 | |
258 | 258 | $namespace = $this->getNamespace(); |
259 | - $principalTypeFQName = $namespace . $principalType->getName(); |
|
260 | - $dependentTypeFQName = $namespace . $dependentType->getName(); |
|
259 | + $principalTypeFQName = $namespace.$principalType->getName(); |
|
260 | + $dependentTypeFQName = $namespace.$dependentType->getName(); |
|
261 | 261 | $association = new TAssociationType(); |
262 | 262 | $relationship = $principalNavigationProperty->getRelationship(); |
263 | 263 | if (false !== strpos($relationship, '.')) { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | $name = $association->getName(); |
313 | 313 | $as->setName($name); |
314 | 314 | $namespace = $this->getNamespace(); |
315 | - $associationSetName = $namespace . $association->getName(); |
|
315 | + $associationSetName = $namespace.$association->getName(); |
|
316 | 316 | $as->setAssociation($associationSetName); |
317 | 317 | $end1 = new EndAnonymousType(); |
318 | 318 | $end1->setRole($association->getEnd()[0]->getRole()); |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | |
373 | 373 | private function initSerialiser() |
374 | 374 | { |
375 | - $ymlDir = __DIR__ . DIRECTORY_SEPARATOR . "MetadataV3" . DIRECTORY_SEPARATOR . "JMSmetadata"; |
|
375 | + $ymlDir = __DIR__.DIRECTORY_SEPARATOR."MetadataV3".DIRECTORY_SEPARATOR."JMSmetadata"; |
|
376 | 376 | $this->serializer = |
377 | 377 | SerializerBuilder::create() |
378 | 378 | ->addMetadataDir($ymlDir) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $numDefaults += $isDefault ? 1 : 0; |
148 | 148 | } |
149 | 149 | if (1 != $numDefaults) { |
150 | - $msg = "Exactly one entityContainer must be set as default container, actually have " . $numDefaults; |
|
150 | + $msg = "Exactly one entityContainer must be set as default container, actually have ".$numDefaults; |
|
151 | 151 | return false; |
152 | 152 | } |
153 | 153 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | die($this->getNamespace()); |
160 | 160 | return false; |
161 | 161 | }*/ |
162 | - $eSetType = str_replace($this->getNamespace() . ".", "", $eSetType); |
|
162 | + $eSetType = str_replace($this->getNamespace().".", "", $eSetType); |
|
163 | 163 | if (!in_array($eSetType, $entityTypeNames)) { |
164 | 164 | $msg = "entitySet Types should have a matching type name in entity Types"; |
165 | 165 | return false; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | // Check Associations to associationSets |
170 | 170 | if (count($associationSets) != count($associationNames)) { |
171 | - $msg = "we have " . count($associationSets) . "association sets and " . count($associationNames) |
|
171 | + $msg = "we have ".count($associationSets)."association sets and ".count($associationNames) |
|
172 | 172 | . " associations, they should be the same"; |
173 | 173 | } |
174 | 174 | if (count($associationNames) * 2 < count($navigationProperties)) { |
@@ -177,33 +177,33 @@ discard block |
||
177 | 177 | } |
178 | 178 | foreach ($associationNames as $associationName => $associationEnds) { |
179 | 179 | if (!array_key_exists($associationName, $associationSets)) { |
180 | - $msg = "association " . $associationName . " exists without matching associationSet"; |
|
180 | + $msg = "association ".$associationName." exists without matching associationSet"; |
|
181 | 181 | return false; |
182 | 182 | } |
183 | 183 | |
184 | 184 | if (!array_key_exists($associationName, $navigationProperties)) { |
185 | - $msg = "association " . $associationName . " exists without matching Natvigation Property"; |
|
185 | + $msg = "association ".$associationName." exists without matching Natvigation Property"; |
|
186 | 186 | return false; |
187 | 187 | } |
188 | 188 | $roles = [$associationEnds[0]->getRole(), $associationEnds[1]->getRole()]; |
189 | 189 | if (!in_array($associationSets[$associationName][0]->getRole(), $roles)) { |
190 | - $msg = "association Set role " . $associationSets[$associationName][0]->getRole() |
|
190 | + $msg = "association Set role ".$associationSets[$associationName][0]->getRole() |
|
191 | 191 | . "lacks a matching property in the attached association"; |
192 | 192 | return false; |
193 | 193 | } |
194 | 194 | if (!in_array($associationSets[$associationName][1]->getRole(), $roles)) { |
195 | - $msg = "association Set role " . $associationSets[$associationName][1]->getRole() |
|
195 | + $msg = "association Set role ".$associationSets[$associationName][1]->getRole() |
|
196 | 196 | . "lacks a matching property in the attached association"; |
197 | 197 | return false; |
198 | 198 | } |
199 | 199 | foreach ($navigationProperties[$associationName] as $navProp) { |
200 | 200 | if (!in_array($navProp->getToRole(), $roles)) { |
201 | - $msg = "Navigation Property Role " . $navProp->getToRole() |
|
201 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
202 | 202 | . " lacks a matching Property in the assocation"; |
203 | 203 | return false; |
204 | 204 | } |
205 | 205 | if (!in_array($navProp->getFromRole(), $roles)) { |
206 | - $msg = "Navigation Property Role " .$navProp->getToRole() |
|
206 | + $msg = "Navigation Property Role ".$navProp->getToRole() |
|
207 | 207 | . " lacks a matching Property in the assocation"; |
208 | 208 | return false; |
209 | 209 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function isTCommandTextValid($string) |
12 | 12 | { |
13 | 13 | if (!is_string($string)) { |
14 | - $msg = "Input must be a string: " . get_class($this); |
|
14 | + $msg = "Input must be a string: ".get_class($this); |
|
15 | 15 | throw new \InvalidArgumentException($msg); |
16 | 16 | } |
17 | 17 | return true; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | public function isTConcurrencyModeValid($string) |
8 | 8 | { |
9 | 9 | if (!is_string($string)) { |
10 | - $msg = "Input must be a string: " . get_class($this); |
|
10 | + $msg = "Input must be a string: ".get_class($this); |
|
11 | 11 | throw new \InvalidArgumentException($msg); |
12 | 12 | } |
13 | 13 | return 'Fixed' == $string || 'None' == $string; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $regex = '/[^ \t]{1,}(\.[^ \t]{1,}){0,}/'; |
18 | 18 | |
19 | 19 | if (!is_string($string)) { |
20 | - $msg = "Input must be a string: " . get_class($this); |
|
20 | + $msg = "Input must be a string: ".get_class($this); |
|
21 | 21 | throw new \InvalidArgumentException($msg); |
22 | 22 | } |
23 | 23 | if ($this->isTQualifiedNameValid($string)) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $regex = "/[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}(\.[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}){0,}/"; |
14 | 14 | |
15 | 15 | if (!is_string($string)) { |
16 | - $msg = "Input must be a string: " . get_class($this); |
|
16 | + $msg = "Input must be a string: ".get_class($this); |
|
17 | 17 | throw new \InvalidArgumentException($msg); |
18 | 18 | } |
19 | 19 | if ($this->isEDMSimpleTypeValid($string)) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $regex = "/Collection\([^ \t]{1,}(\.[^ \t]{1,}){0,}\)/"; |
18 | 18 | |
19 | 19 | if (!is_string($string)) { |
20 | - $msg = "Input must be a string: " . get_class($this); |
|
20 | + $msg = "Input must be a string: ".get_class($this); |
|
21 | 21 | throw new \InvalidArgumentException($msg); |
22 | 22 | } |
23 | 23 | if ($this->isEDMSimpleTypeValid($string)) { |
@@ -7,7 +7,7 @@ |
||
7 | 7 | public function isTActionValid($string) |
8 | 8 | { |
9 | 9 | if (!is_string($string)) { |
10 | - $msg = "Input must be a string: " . get_class($this); |
|
10 | + $msg = "Input must be a string: ".get_class($this); |
|
11 | 11 | throw new \InvalidArgumentException($msg); |
12 | 12 | } |
13 | 13 | return 'Cascade' == $string || 'None' == $string; |