@@ -28,8 +28,7 @@ |
||
28 | 28 | EdmUtil::checkArgumentNull($functionImport->Location(), 'functionImport->Location'); |
29 | 29 | if ($functionImport->getEntitySet() != null && $functionImport->getReturnType() != null) { |
30 | 30 | $elementType = $functionImport->getReturnType()->IsCollection() ? |
31 | - $functionImport->getReturnType()->AsCollection()->ElementType() : |
|
32 | - $functionImport->getReturnType(); |
|
31 | + $functionImport->getReturnType()->AsCollection()->ElementType() : $functionImport->getReturnType(); |
|
33 | 32 | if ($elementType->IsEntity()) { |
34 | 33 | $returnedEntityType = $elementType->AsEntity()->EntityDefinition(); |
35 | 34 |
@@ -50,14 +50,12 @@ |
||
50 | 50 | ); |
51 | 51 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */ |
52 | 52 | assert( |
53 | - (is_array($isBad) ? new ReflectionMethod(...$isBad) : |
|
54 | - new ReflectionFunction($isBad))->getParameters()[0]->getType()->getName() === IEdmElement::class, |
|
53 | + (is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad))->getParameters()[0]->getType()->getName() === IEdmElement::class, |
|
55 | 54 | '$isBad should be a callable taking one parameter of Type IEdmElement' |
56 | 55 | ); |
57 | 56 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */ |
58 | 57 | assert( |
59 | - (is_array($isBad) ? new ReflectionMethod(...$isBad) : |
|
60 | - new ReflectionFunction($isBad))->getReturnType()->getName() === 'bool', |
|
58 | + (is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad))->getReturnType()->getName() === 'bool', |
|
61 | 59 | '$isBad should be a callable returning a boolean' |
62 | 60 | ); |
63 | 61 | $this->model = $model; |
@@ -24,8 +24,7 @@ |
||
24 | 24 | assert($functionImport instanceof IFunctionImport); |
25 | 25 | if ($functionImport->getReturnType() != null) { |
26 | 26 | $elementType = $functionImport->getReturnType()->IsCollection() ? |
27 | - $functionImport->getReturnType()->AsCollection()->ElementType() : |
|
28 | - $functionImport->getReturnType(); |
|
27 | + $functionImport->getReturnType()->AsCollection()->ElementType() : $functionImport->getReturnType(); |
|
29 | 28 | if (!$elementType->IsPrimitive() && |
30 | 29 | !$elementType->IsEntity() && |
31 | 30 | !$elementType->IsComplex() && |
@@ -28,10 +28,10 @@ |
||
28 | 28 | if (!$context->checkIsBad($enumMember->getDeclaringType()) && |
29 | 29 | !$context->checkIsBad($enumMember->getDeclaringType()->getUnderlyingType()) && |
30 | 30 | !ExpressionTypeChecker::TryAssertPrimitiveAsType( |
31 | - $enumMember->getValue(), |
|
32 | - EdmTypeSemantics::GetPrimitiveTypeReference($enumMember->getDeclaringType()->getUnderlyingType(), false), |
|
33 | - $discoveredErrors |
|
34 | - )) { |
|
31 | + $enumMember->getValue(), |
|
32 | + EdmTypeSemantics::GetPrimitiveTypeReference($enumMember->getDeclaringType()->getUnderlyingType(), false), |
|
33 | + $discoveredErrors |
|
34 | + )) { |
|
35 | 35 | EdmUtil::checkArgumentNull($enumMember->Location(), 'enumMember->Location'); |
36 | 36 | $context->AddError( |
37 | 37 | $enumMember->Location(), |
@@ -36,7 +36,7 @@ |
||
36 | 36 | // Note: this check can be done without the try/catch block, but we need XmlConvert.IsStartNCNameChar and |
37 | 37 | // XmlConvert.IsNCNameChar, which are not available in 3.5. |
38 | 38 | if (!XmlConvert::VerifyNCName($annotation->getName())) { |
39 | - $value = $annotation->getValue() ; |
|
39 | + $value = $annotation->getValue(); |
|
40 | 40 | $errorLocation = ($value === null || !($value instanceof IValue)) ? null : $value->Location(); |
41 | 41 | $error = new EdmError( |
42 | 42 | $errorLocation, |
@@ -33,7 +33,7 @@ |
||
33 | 33 | ); |
34 | 34 | break; |
35 | 35 | |
36 | - case SchemaElementKind::Function(): |
|
36 | + case SchemaElementKind::Function (): |
|
37 | 37 | InterfaceValidator::CollectErrors( |
38 | 38 | InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
39 | 39 | $item, |
@@ -33,7 +33,7 @@ |
||
33 | 33 | ); |
34 | 34 | break; |
35 | 35 | |
36 | - case SchemaElementKind::Function(): |
|
36 | + case SchemaElementKind::function(): |
|
37 | 37 | InterfaceValidator::CollectErrors( |
38 | 38 | InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
39 | 39 | $item, |
@@ -98,7 +98,7 @@ |
||
98 | 98 | break; |
99 | 99 | } |
100 | 100 | |
101 | - return null !== $typeKindError ? [$typeKindError ] : null; |
|
101 | + return null !== $typeKindError ? [$typeKindError] : null; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | public function forType(): string |
@@ -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]], |