@@ -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) |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * isset end. |
113 | 113 | * |
114 | - * @param scalar $index |
|
114 | + * @param integer $index |
|
115 | 115 | * @return bool |
116 | 116 | */ |
117 | 117 | public function issetEnd($index) |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | /** |
123 | 123 | * unset end. |
124 | 124 | * |
125 | - * @param scalar $index |
|
125 | + * @param integer $index |
|
126 | 126 | * @return void |
127 | 127 | */ |
128 | 128 | public function unsetEnd($index) |
@@ -142,7 +142,7 @@ |
||
142 | 142 | /** |
143 | 143 | * Sets a new binary. |
144 | 144 | * |
145 | - * @param mixed $binary |
|
145 | + * @param string $binary |
|
146 | 146 | * @return self |
147 | 147 | */ |
148 | 148 | public function setBinary($binary) |
@@ -687,29 +687,29 @@ discard block |
||
687 | 687 | $counter += isset($this->$name) ? 1 : 0; |
688 | 688 | } |
689 | 689 | if (-1 < $this->gExpressionMinimum && $counter < $this->gExpressionMinimum) { |
690 | - $msg = $counter . ' fields not null. Need minimum of '.$this->gExpressionMinimum. ': ' |
|
690 | + $msg = $counter.' fields not null. Need minimum of '.$this->gExpressionMinimum.': ' |
|
691 | 691 | . get_class($this); |
692 | 692 | return false; |
693 | 693 | } |
694 | 694 | if (-1 < $this->gExpressionMaximum && $counter > $this->gExpressionMaximum) { |
695 | - $msg = $counter . ' fields not null. Need maximum of '.$this->gExpressionMaximum. ': ' |
|
695 | + $msg = $counter.' fields not null. Need maximum of '.$this->gExpressionMaximum.': ' |
|
696 | 696 | . get_class($this); |
697 | 697 | return false; |
698 | 698 | } |
699 | 699 | } |
700 | 700 | |
701 | 701 | if (null != $this->guid && !$this->isTGuidLiteralValid($this->guid)) { |
702 | - $msg = 'Guid must be a valid TGuidLiteral: ' . get_class($this); |
|
702 | + $msg = 'Guid must be a valid TGuidLiteral: '.get_class($this); |
|
703 | 703 | return false; |
704 | 704 | } |
705 | 705 | |
706 | 706 | if (null != $this->enum && !$this->isTQualifiedNameValid($this->enum)) { |
707 | - $msg = 'Enum must be a valid TQualifiedName: ' . get_class($this); |
|
707 | + $msg = 'Enum must be a valid TQualifiedName: '.get_class($this); |
|
708 | 708 | return false; |
709 | 709 | } |
710 | 710 | |
711 | 711 | if (null != $this->path && !$this->isTQualifiedNameValid($this->path)) { |
712 | - $msg = 'Path must be a valid TQualifiedName: ' . get_class($this); |
|
712 | + $msg = 'Path must be a valid TQualifiedName: '.get_class($this); |
|
713 | 713 | return false; |
714 | 714 | } |
715 | 715 | |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | return false; |
726 | 726 | } |
727 | 727 | if (!$this->isObjectNullOrType($type, $this->$key)) { |
728 | - $msg = 'Type mismatch - should be ' . $type . ', is ' . get_class($this->$key) . ': ' . get_class($this); |
|
728 | + $msg = 'Type mismatch - should be '.$type.', is '.get_class($this->$key).': '.get_class($this); |
|
729 | 729 | return false; |
730 | 730 | } |
731 | 731 | } |
@@ -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 bool |
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) |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | public function isTFunctionImportAttributesValid(&$msg) |
267 | 267 | { |
268 | 268 | if (!$this->isTSimpleIdentifierValid($this->name)) { |
269 | - $msg = 'Name must be a valid TSimpleIdentifier: ' . get_class($this); |
|
269 | + $msg = 'Name must be a valid TSimpleIdentifier: '.get_class($this); |
|
270 | 270 | return false; |
271 | 271 | } |
272 | 272 | if ($this->isComposable && $this->isSideEffecting) { |
@@ -279,11 +279,11 @@ discard block |
||
279 | 279 | return false; |
280 | 280 | }*/ |
281 | 281 | if (!$this->isObjectNullOrType('\AlgoWeb\ODataMetadata\MetadataV3\edm\TOperandType', $this->entitySet)) { |
282 | - $msg = 'Entity set must be either null or an instance of TOperandType: ' . get_class($this); |
|
282 | + $msg = 'Entity set must be either null or an instance of TOperandType: '.get_class($this); |
|
283 | 283 | return false; |
284 | 284 | } |
285 | 285 | if (null != $this->methodAccess && !$this->isTAccessOk($this->methodAccess)) { |
286 | - $msg = 'Method access must be a valid TAccess: ' . get_class($this); |
|
286 | + $msg = 'Method access must be a valid TAccess: '.get_class($this); |
|
287 | 287 | return false; |
288 | 288 | } |
289 | 289 | if (!$this->isValidArrayOK( |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Gets or sets the inner value. |
32 | 32 | * |
33 | 33 | * @param bool ...$value |
34 | - * @param bool[] $value |
|
34 | + * @param boolean[] $value |
|
35 | 35 | * @return bool |
36 | 36 | */ |
37 | 37 | public function value(...$value) |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Gets or sets the inner value. |
32 | 32 | * |
33 | 33 | * @param float ...$value |
34 | - * @param float[] $value |
|
34 | + * @param double[] $value |
|
35 | 35 | * @return float |
36 | 36 | */ |
37 | 37 | public function value(...$value) |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Gets or sets the inner value. |
32 | 32 | * |
33 | 33 | * @param float ...$value |
34 | - * @param float[] $value |
|
34 | + * @param double[] $value |
|
35 | 35 | * @return float |
36 | 36 | */ |
37 | 37 | public function value(...$value) |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Gets or sets the inner value. |
32 | 32 | * |
33 | 33 | * @param int ...$value |
34 | - * @param int[] $value |
|
34 | + * @param integer[] $value |
|
35 | 35 | * @return int |
36 | 36 | */ |
37 | 37 | public function value(...$value) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return true; |
76 | 76 | } |
77 | 77 | if (!$object instanceof $instanceOf) { |
78 | - $msg = 'Supplied object not an instance of ' . $instanceOf . ': ' . get_class($this); |
|
78 | + $msg = 'Supplied object not an instance of '.$instanceOf.': '.get_class($this); |
|
79 | 79 | return false; |
80 | 80 | } |
81 | 81 | return $object->isOK($msg); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | $result = $this->isValidArray($arr, $instanceOf, $minCount, $maxCount); |
87 | 87 | if (!$result) { |
88 | - $msg = 'Supplied array not a valid array: ' . get_class($this); |
|
88 | + $msg = 'Supplied array not a valid array: '.get_class($this); |
|
89 | 89 | return false; |
90 | 90 | } |
91 | 91 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | foreach ($arr as $item) { |
119 | 119 | if (!($item instanceof IsOK)) { |
120 | - $msg = 'Child item is not an instance of IsOK: ' . get_class($this); |
|
120 | + $msg = 'Child item is not an instance of IsOK: '.get_class($this); |
|
121 | 121 | return false; |
122 | 122 | } |
123 | 123 | if (!$item->isOK($msg)) { |