@@ -26,7 +26,7 @@ |
||
| 26 | 26 | if (!in_array($property->getPartner(), $prop)) { |
| 27 | 27 | $followup[] = $property->getPartner(); |
| 28 | 28 | } else { |
| 29 | - $references[] =$property->getPartner(); |
|
| 29 | + $references[] = $property->getPartner(); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if ($property->getPartner()->getPartner() !== $property || $property->getPartner() === $property) { |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $thisTypeKeys = array_keys($thisFunction->getParameters()); |
| 146 | 146 | $otherTypeKeys = array_keys($otherFunction->getParameters()); |
| 147 | - $keyCount = count($thisTypeKeys); |
|
| 147 | + $keyCount = count($thisTypeKeys); |
|
| 148 | 148 | for ($i = 0; $i < $keyCount; ++$i) { |
| 149 | 149 | if (!self::isEquivalentTo( |
| 150 | 150 | $thisFunction->getParameters()[$thisTypeKeys[$i]], |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | $thisTypeKeys = array_keys($thisType->getDeclaredProperties()); |
| 209 | 209 | $otherTypeKeys = array_keys($otherType->getDeclaredProperties()); |
| 210 | - $keyCount = count($thisTypeKeys); |
|
| 210 | + $keyCount = count($thisTypeKeys); |
|
| 211 | 211 | for ($i = 0; $i < $keyCount; ++$i) { |
| 212 | 212 | if (!self::isEquivalentTo( |
| 213 | 213 | $thisType->getDeclaredProperties()[$thisTypeKeys[$i]], |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $annotation, |
| 52 | 52 | EdmConstants::InternalUri, |
| 53 | 53 | CsdlConstants::AnnotationSerializationLocationAnnotation, |
| 54 | - (object)$location |
|
| 54 | + (object) $location |
|
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** @var IVocabularyAnnotation $annotation */ |
| 20 | 20 | $annotation = $this; |
| 21 | 21 | return $annotation->GetSerializationLocation($model) == |
| 22 | - EdmVocabularyAnnotationSerializationLocation::Inline || null === $annotation->TargetString(); |
|
| 22 | + EdmVocabularyAnnotationSerializationLocation::Inline || null === $annotation->TargetString(); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public function TargetString(): string |
@@ -1338,14 +1338,12 @@ discard block |
||
| 1338 | 1338 | { |
| 1339 | 1339 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
| 1340 | 1340 | assert( |
| 1341 | - count((is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
| 1342 | - new ReflectionFunction($toXml))->getParameters()) === 1, |
|
| 1341 | + count((is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getParameters()) === 1, |
|
| 1343 | 1342 | '$toXml should be a callable takeing one paramater of mixed type' |
| 1344 | 1343 | ); |
| 1345 | 1344 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
| 1346 | 1345 | assert( |
| 1347 | - (is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
| 1348 | - new ReflectionFunction($toXml))->getReturnType()->getName() === 'string', |
|
| 1346 | + (is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getReturnType()->getName() === 'string', |
|
| 1349 | 1347 | '$toXml should be a callable returning a string' |
| 1350 | 1348 | ); |
| 1351 | 1349 | if ($value !== $defaultValue) { |
@@ -1363,14 +1361,12 @@ discard block |
||
| 1363 | 1361 | { |
| 1364 | 1362 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
| 1365 | 1363 | assert( |
| 1366 | - count((is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
| 1367 | - new ReflectionFunction($toXml))->getParameters()) === 1, |
|
| 1364 | + count((is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getParameters()) === 1, |
|
| 1368 | 1365 | '$toXml should be a callable takeing one paramater of mixed type' |
| 1369 | 1366 | ); |
| 1370 | 1367 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts.*/ |
| 1371 | 1368 | assert( |
| 1372 | - (is_array($toXml) ? new ReflectionMethod(...$toXml) : |
|
| 1373 | - new ReflectionFunction($toXml))->getReturnType()->getName() === 'string', |
|
| 1369 | + (is_array($toXml) ? new ReflectionMethod(...$toXml) : new ReflectionFunction($toXml))->getReturnType()->getName() === 'string', |
|
| 1374 | 1370 | '$toXml should be a callable returning a string' |
| 1375 | 1371 | ); |
| 1376 | 1372 | $this->xmlWriter->writeAttribute($attribute, $toXml($value)); |
@@ -1464,7 +1460,7 @@ discard block |
||
| 1464 | 1460 | |
| 1465 | 1461 | private static function SridAsXml(?int $i): string |
| 1466 | 1462 | { |
| 1467 | - return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable; |
|
| 1463 | + return $i !== null ? strval($i) : CsdlConstants::Value_SridVariable; |
|
| 1468 | 1464 | } |
| 1469 | 1465 | |
| 1470 | 1466 | /** |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $this->lookup[ExpressionKind::ValueTermReference()->getValue()] = IValueTermReferenceExpression::class; |
| 62 | 62 | $this->lookup[ExpressionKind::EntitySetReference()->getValue()] = IEntitySetReferenceExpression::class; |
| 63 | 63 | $this->lookup[ExpressionKind::EnumMemberReference()->getValue()] = IEnumMemberReferenceExpression::class; |
| 64 | - $this->lookup[ExpressionKind::If()->getValue()] = IIfExpression::class; |
|
| 64 | + $this->lookup[ExpressionKind::If ()->getValue()] = IIfExpression::class; |
|
| 65 | 65 | $this->lookup[ExpressionKind::AssertType()->getValue()] = IAssertTypeExpression::class; |
| 66 | 66 | $this->lookup[ExpressionKind::IsType()->getValue()] = IIsTypeExpression::class; |
| 67 | 67 | $this->lookup[ExpressionKind::FunctionApplication()->getValue()] = IApplyExpression::class; |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | $this->lookup[ExpressionKind::ValueTermReference()->getValue()] = IValueTermReferenceExpression::class; |
| 62 | 62 | $this->lookup[ExpressionKind::EntitySetReference()->getValue()] = IEntitySetReferenceExpression::class; |
| 63 | 63 | $this->lookup[ExpressionKind::EnumMemberReference()->getValue()] = IEnumMemberReferenceExpression::class; |
| 64 | - $this->lookup[ExpressionKind::If()->getValue()] = IIfExpression::class; |
|
| 64 | + $this->lookup[ExpressionKind::If() { |
|
| 65 | + ->getValue()] = IIfExpression::class; |
|
| 66 | + } |
|
| 65 | 67 | $this->lookup[ExpressionKind::AssertType()->getValue()] = IAssertTypeExpression::class; |
| 66 | 68 | $this->lookup[ExpressionKind::IsType()->getValue()] = IIsTypeExpression::class; |
| 67 | 69 | $this->lookup[ExpressionKind::FunctionApplication()->getValue()] = IApplyExpression::class; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->lookup[ExpressionKind::DecimalConstant()->getValue()] = IDecimalConstantExpression::class; |
| 52 | 52 | $this->lookup[ExpressionKind::FloatingConstant()->getValue()] = IFloatingConstantExpression::class; |
| 53 | 53 | $this->lookup[ExpressionKind::GuidConstant()->getValue()] = IGuidConstantExpression::class; |
| 54 | - $this->lookup[ExpressionKind::Null()->getValue()] = INullExpression::class; |
|
| 54 | + $this->lookup[ExpressionKind::null()->getValue()] = INullExpression::class; |
|
| 55 | 55 | $this->lookup[ExpressionKind::Record()->getValue()] = IRecordExpression::class; |
| 56 | 56 | $this->lookup[ExpressionKind::Collection()->getValue()] = ICollectionExpression::class; |
| 57 | 57 | $this->lookup[ExpressionKind::Path()->getValue()] = IPathExpression::class; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->lookup[ExpressionKind::ValueTermReference()->getValue()] = IValueTermReferenceExpression::class; |
| 62 | 62 | $this->lookup[ExpressionKind::EntitySetReference()->getValue()] = IEntitySetReferenceExpression::class; |
| 63 | 63 | $this->lookup[ExpressionKind::EnumMemberReference()->getValue()] = IEnumMemberReferenceExpression::class; |
| 64 | - $this->lookup[ExpressionKind::If()->getValue()] = IIfExpression::class; |
|
| 64 | + $this->lookup[ExpressionKind::if()->getValue()] = IIfExpression::class; |
|
| 65 | 65 | $this->lookup[ExpressionKind::AssertType()->getValue()] = IAssertTypeExpression::class; |
| 66 | 66 | $this->lookup[ExpressionKind::IsType()->getValue()] = IIsTypeExpression::class; |
| 67 | 67 | $this->lookup[ExpressionKind::FunctionApplication()->getValue()] = IApplyExpression::class; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | /** @var EdmModelVisitor $this */ |
| 36 | 36 | switch ($element->getSchemaElementKind()) { |
| 37 | - case SchemaElementKind::Function(): |
|
| 37 | + case SchemaElementKind::Function (): |
|
| 38 | 38 | assert($element instanceof IFunction); |
| 39 | 39 | $this->processFunction($element); |
| 40 | 40 | break; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | /** @var EdmModelVisitor $this */ |
| 36 | 36 | switch ($element->getSchemaElementKind()) { |
| 37 | - case SchemaElementKind::Function(): |
|
| 37 | + case SchemaElementKind::function(): |
|
| 38 | 38 | assert($element instanceof IFunction); |
| 39 | 39 | $this->processFunction($element); |
| 40 | 40 | break; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function visitAnnotations(iterable $annotations): void |
| 29 | 29 | { |
| 30 | 30 | /** @var EdmModelVisitor $this */ |
| 31 | - self::visitCollection($annotations, [$this,'visitAnnotation']); |
|
| 31 | + self::visitCollection($annotations, [$this, 'visitAnnotation']); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -43,8 +43,7 @@ |
||
| 43 | 43 | StringConst::EdmModel_Validator_Semantic_InvalidPropertyTypeConcurrencyMode( |
| 44 | 44 | ( |
| 45 | 45 | $propType->IsCollection() ? |
| 46 | - EdmConstants::Type_Collection : |
|
| 47 | - $key |
|
| 46 | + EdmConstants::Type_Collection : $key |
|
| 48 | 47 | ) |
| 49 | 48 | ) |
| 50 | 49 | ); |
@@ -1294,7 +1294,7 @@ discard block |
||
| 1294 | 1294 | |
| 1295 | 1295 | // Association Set |
| 1296 | 1296 | if (!($this->model->GetAssociationSetName($thisEntitySet, $thisNavprop) == |
| 1297 | - $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
| 1297 | + $this->model->GetAssociationSetName($thatEntitySet, $thatNavprop) && |
|
| 1298 | 1298 | $this->model->GetAssociationFullName($thisNavprop) == $this->model->GetAssociationFullName($thatNavprop))) { |
| 1299 | 1299 | return false; |
| 1300 | 1300 | } |
@@ -1316,7 +1316,7 @@ discard block |
||
| 1316 | 1316 | |
| 1317 | 1317 | if (null !== $thisOtherEntitySet) { |
| 1318 | 1318 | if (!($this->model->GetAssociationEndName($thisNavprop->getPartner()) == |
| 1319 | - $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
| 1319 | + $this->model->GetAssociationEndName($thatNavprop->getPartner()) && |
|
| 1320 | 1320 | $thisOtherEntitySet->getName() == $thatOtherEntitySet->getName())) { |
| 1321 | 1321 | return false; |
| 1322 | 1322 | } |
@@ -132,8 +132,7 @@ discard block |
||
| 132 | 132 | $alias = null; |
| 133 | 133 | if ($this->namespaceAliasMappings != null) { |
| 134 | 134 | $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ? |
| 135 | - $this->namespaceAliasMappings[$element->getNamespace()] : |
|
| 136 | - null; |
|
| 135 | + $this->namespaceAliasMappings[$element->getNamespace()] : null; |
|
| 137 | 136 | } |
| 138 | 137 | |
| 139 | 138 | $this->schemaWriter->WriteSchemaElementHeader($element, $alias, $mappings); |
@@ -609,7 +608,7 @@ discard block |
||
| 609 | 608 | protected function ProcessPropertyReferenceExpression(IPropertyReferenceExpression $expression): void |
| 610 | 609 | { |
| 611 | 610 | $this->BeginElement($expression, [$this->schemaWriter, 'WritePropertyReferenceExpressionElementHeader']); |
| 612 | - if ($expression->getBase()!= null) { |
|
| 611 | + if ($expression->getBase() != null) { |
|
| 613 | 612 | $this->VisitExpression($expression->getBase()); |
| 614 | 613 | } |
| 615 | 614 | |
@@ -1208,10 +1207,10 @@ discard block |
||
| 1208 | 1207 | return false; |
| 1209 | 1208 | } |
| 1210 | 1209 | |
| 1211 | - $thisAssociationAnnotations =[]; |
|
| 1210 | + $thisAssociationAnnotations = []; |
|
| 1212 | 1211 | $thisEnd1Annotations = []; |
| 1213 | - $thisEnd2Annotations =[]; |
|
| 1214 | - $thisConstraintAnnotations =[]; |
|
| 1212 | + $thisEnd2Annotations = []; |
|
| 1213 | + $thisConstraintAnnotations = []; |
|
| 1215 | 1214 | $this->model->GetAssociationAnnotations( |
| 1216 | 1215 | $thisPrimary, |
| 1217 | 1216 | $thisAssociationAnnotations, |
@@ -1223,7 +1222,7 @@ discard block |
||
| 1223 | 1222 | $thatAssociationAnnotations = []; |
| 1224 | 1223 | $thatEnd1Annotations = []; |
| 1225 | 1224 | $thatEnd2Annotations = []; |
| 1226 | - $thatConstraintAnnotations =[]; |
|
| 1225 | + $thatConstraintAnnotations = []; |
|
| 1227 | 1226 | $this->model->GetAssociationAnnotations( |
| 1228 | 1227 | $thatPrimary, |
| 1229 | 1228 | $thatAssociationAnnotations, |
@@ -1268,7 +1267,7 @@ discard block |
||
| 1268 | 1267 | if (null === $theseProperties || null === $thoseProperties) { |
| 1269 | 1268 | return false; |
| 1270 | 1269 | } |
| 1271 | - $numProp = count($theseProperties); |
|
| 1270 | + $numProp = count($theseProperties); |
|
| 1272 | 1271 | if ($numProp != count($thoseProperties)) { |
| 1273 | 1272 | return false; |
| 1274 | 1273 | } |
@@ -1339,8 +1338,8 @@ discard block |
||
| 1339 | 1338 | ); |
| 1340 | 1339 | |
| 1341 | 1340 | $thatAssociationSetAnnotations = []; |
| 1342 | - $thatEnd1Annotations =[]; |
|
| 1343 | - $thatEnd2Annotations =[]; |
|
| 1341 | + $thatEnd1Annotations = []; |
|
| 1342 | + $thatEnd2Annotations = []; |
|
| 1344 | 1343 | $this->model->GetAssociationSetAnnotations( |
| 1345 | 1344 | $thatEntitySet, |
| 1346 | 1345 | $thatNavprop, |