@@ -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 | /** |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function getExpressionKind(): ExpressionKind |
49 | 49 | { |
50 | - return ExpressionKind::If(); |
|
50 | + return ExpressionKind::If (); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function getExpressionKind(): ExpressionKind |
49 | 49 | { |
50 | - return ExpressionKind::If(); |
|
50 | + return ExpressionKind::if(); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function getValueKind(): ValueKind |
34 | 34 | { |
35 | - return ValueKind::Null(); |
|
35 | + return ValueKind::null(); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,6 +40,6 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getExpressionKind(): ExpressionKind |
42 | 42 | { |
43 | - return ExpressionKind::Null(); |
|
43 | + return ExpressionKind::null(); |
|
44 | 44 | } |
45 | 45 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | $this->lookup[SchemaElementKind::TypeDefinition()->getKey()] = ISchemaType::class; |
23 | - $this->lookup[SchemaElementKind::Function()->getKey()] = IFunction::class; |
|
23 | + $this->lookup[SchemaElementKind::Function ()->getKey()] = IFunction::class; |
|
24 | 24 | $this->lookup[SchemaElementKind::ValueTerm()->getKey()] = IValueTerm::class; |
25 | 25 | $this->lookup[SchemaElementKind::EntityContainer()->getKey()] = IEntityContainer::class; |
26 | 26 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function __construct() |
21 | 21 | { |
22 | 22 | $this->lookup[SchemaElementKind::TypeDefinition()->getKey()] = ISchemaType::class; |
23 | - $this->lookup[SchemaElementKind::Function()->getKey()] = IFunction::class; |
|
23 | + $this->lookup[SchemaElementKind::function()->getKey()] = IFunction::class; |
|
24 | 24 | $this->lookup[SchemaElementKind::ValueTerm()->getKey()] = IValueTerm::class; |
25 | 25 | $this->lookup[SchemaElementKind::EntityContainer()->getKey()] = IEntityContainer::class; |
26 | 26 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $this->lookup[ValueKind::Floating()->getValue()] = IFloatingValue::class; |
40 | 40 | $this->lookup[ValueKind::Guid()->getValue()] = IGuidValue::class; |
41 | 41 | $this->lookup[ValueKind::Integer()->getValue()] = IIntegerValue::class; |
42 | - $this->lookup[ValueKind::Null()->getValue()] = INullValue::class; |
|
42 | + $this->lookup[ValueKind::null()->getValue()] = INullValue::class; |
|
43 | 43 | $this->lookup[ValueKind::String()->getValue()] = IStringValue::class; |
44 | 44 | $this->lookup[ValueKind::Structured()->getValue()] = IStructuredValue::class; |
45 | 45 | $this->lookup[ValueKind::Time()->getValue()] = ITimeValue::class; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ); |
37 | 37 | }; |
38 | 38 | assert( |
39 | - $expectedReflection->getNumberOfRequiredParameters() === $actualReflection->getNumberOfRequiredParameters(), |
|
39 | + $expectedReflection->getNumberOfRequiredParameters() === $actualReflection->getNumberOfRequiredParameters(), |
|
40 | 40 | $messageBuilder('Incorrect Parameter Count') |
41 | 41 | ); |
42 | 42 | if ($expectedReflection->hasReturnType()) { |
@@ -48,11 +48,9 @@ discard block |
||
48 | 48 | $expectedReturnType = $expectedReflection->getReturnType(); |
49 | 49 | $actualReturnType = $actualReflection->getReturnType(); |
50 | 50 | $name = $expectedReturnType instanceof ReflectionNamedType ? |
51 | - $expectedReturnType->getName() : |
|
52 | - strval($expectedReturnType); |
|
51 | + $expectedReturnType->getName() : strval($expectedReturnType); |
|
53 | 52 | $actName = $actualReturnType instanceof ReflectionNamedType ? |
54 | - $actualReturnType->getName() : |
|
55 | - strval($actualReturnType); |
|
53 | + $actualReturnType->getName() : strval($actualReturnType); |
|
56 | 54 | |
57 | 55 | assert( |
58 | 56 | $name === $actName, |
@@ -77,11 +75,9 @@ discard block |
||
77 | 75 | $expectedParmType = $expectedParm->getType(); |
78 | 76 | $actualParmType = $actualParm->getType(); |
79 | 77 | $name = $expectedParmType instanceof ReflectionNamedType ? |
80 | - $expectedParmType->getName() : |
|
81 | - strval($expectedParmType); |
|
78 | + $expectedParmType->getName() : strval($expectedParmType); |
|
82 | 79 | $actName = $actualParmType instanceof ReflectionNamedType ? |
83 | - $actualParmType->getName() : |
|
84 | - strval($actualParmType); |
|
80 | + $actualParmType->getName() : strval($actualParmType); |
|
85 | 81 | |
86 | 82 | //TODO: improve this to check that the actual type does not return a childType; |
87 | 83 | assert( |
@@ -107,8 +103,7 @@ discard block |
||
107 | 103 | if ($parameter->hasType()) { |
108 | 104 | $parmType = $parameter->getType(); |
109 | 105 | $parmName = $parmType instanceof ReflectionNamedType ? |
110 | - $parmType->getName() : |
|
111 | - strval($parmType); |
|
106 | + $parmType->getName() : strval($parmType); |
|
112 | 107 | $parameterString .= $parmType->allowsNull() ? '?' : ''; |
113 | 108 | $parameterString .= $parmName . ' '; |
114 | 109 | } |
@@ -127,8 +122,7 @@ discard block |
||
127 | 122 | if ($reflection->hasReturnType()) { |
128 | 123 | $returnType = $reflection->getReturnType(); |
129 | 124 | $name = $returnType instanceof ReflectionNamedType ? |
130 | - $returnType->getName() : |
|
131 | - strval($returnType); |
|
125 | + $returnType->getName() : strval($returnType); |
|
132 | 126 | $return .= ': ' . $name; |
133 | 127 | } |
134 | 128 | return sprintf('function(%s)%s', implode(',', $parameters), $return); |
@@ -56,12 +56,10 @@ |
||
56 | 56 | $stem = is_array($isBad) ? new ReflectionMethod(...$isBad) : new ReflectionFunction($isBad); |
57 | 57 | $stemReturnType = $stem->getReturnType(); |
58 | 58 | $stemName = $stemReturnType instanceof ReflectionNamedType ? |
59 | - $stemReturnType->getName() : |
|
60 | - strval($stemReturnType); |
|
59 | + $stemReturnType->getName() : strval($stemReturnType); |
|
61 | 60 | $stemParmType = $stem->getParameters()[0]->getType(); |
62 | 61 | $stemParmName = $stemParmType instanceof ReflectionNamedType ? |
63 | - $stemParmType->getName() : |
|
64 | - strval($stemParmType); |
|
62 | + $stemParmType->getName() : strval($stemParmType); |
|
65 | 63 | |
66 | 64 | /* @noinspection PhpUnhandledExceptionInspection suppressing exceptions for asserts. */ |
67 | 65 | assert( |
@@ -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() && |
@@ -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 | ); |