@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | assert($typeRef instanceof IStructuredTypeReference); |
| 16 | 16 | return null !== $typeRef->getDefinition() && !$typeRef->getDefinition()->getTypeKind()->IsStructured() |
| 17 | - ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
| 17 | + ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $primitive = $typeRef->getDefinition(); |
| 18 | 18 | assert($primitive instanceof IPrimitiveType); |
| 19 | 19 | return null !== $typeRef->getDefinition() && !$primitive->getPrimitiveKind()->IsSpatial() |
| 20 | - ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
| 20 | + ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function forType(): string |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $primitive = $typeRef->getDefinition(); |
| 18 | 18 | assert($primitive instanceof IPrimitiveType); |
| 19 | 19 | return null !== $typeRef->getDefinition() && !$primitive->getPrimitiveKind()->isBinary() |
| 20 | - ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null; |
|
| 20 | + ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function forType(): string |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | assert($property instanceof IStructuralProperty); |
| 25 | 25 | if ($property->getDeclaringType()->getTypeKind()->isRow()) { |
| 26 | 26 | $validatedType = $property->getType()->IsCollection() ? |
| 27 | - $property->getType()->AsCollection()->ElementType()->getDefinition() : |
|
| 28 | - $property->getType()->getDefinition(); |
|
| 27 | + $property->getType()->AsCollection()->ElementType()->getDefinition() : $property->getType()->getDefinition(); |
|
| 29 | 28 | |
| 30 | 29 | EdmUtil::checkArgumentNull($validatedType, 'validatedType'); |
| 31 | 30 | if (!$validatedType->getTypeKind()->isPrimitive() && |
@@ -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() && |
@@ -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, |