@@ -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, |
@@ -41,8 +41,7 @@ |
||
41 | 41 | EdmErrorCode $errorCode, |
42 | 42 | string $errorString, |
43 | 43 | bool $suppressError |
44 | - ) |
|
45 | - { |
|
44 | + ) { |
|
46 | 45 | $name = $item instanceof ISchemaElement ? $item->FullName() : $item->getName(); |
47 | 46 | if ($memberNameList->add($name)) { |
48 | 47 | if (!$suppressError) { |
@@ -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, |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | ); |
225 | 225 | break; |
226 | 226 | |
227 | - case ExpressionKind::If(): |
|
227 | + case ExpressionKind::If (): |
|
228 | 228 | $expressionKindError = InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
229 | 229 | $expression, |
230 | 230 | $expression->getExpressionKind(), |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | } |
289 | 289 | } |
290 | 290 | |
291 | - return null !== $expressionKindError ? [ $expressionKindError ] : null; |
|
291 | + return null !== $expressionKindError ? [$expressionKindError] : null; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | public function forType(): string |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | ); |
135 | 135 | break; |
136 | 136 | |
137 | - case ExpressionKind::Null(): |
|
137 | + case ExpressionKind::null(): |
|
138 | 138 | $expressionKindError = InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
139 | 139 | $expression, |
140 | 140 | $expression->getExpressionKind(), |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | ); |
225 | 225 | break; |
226 | 226 | |
227 | - case ExpressionKind::If(): |
|
227 | + case ExpressionKind::if(): |
|
228 | 228 | $expressionKindError = InterfaceValidator::CheckForInterfaceKindValueMismatchError( |
229 | 229 | $expression, |
230 | 230 | $expression->getExpressionKind(), |
@@ -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) { |