@@ -29,19 +29,19 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class ValueKind extends Enum |
| 31 | 31 | { |
| 32 | - protected const None =0; |
|
| 32 | + protected const None = 0; |
|
| 33 | 33 | protected const Binary = 1; |
| 34 | - protected const Boolean =2; |
|
| 35 | - protected const Collection =3; |
|
| 36 | - protected const DateTimeOffset=4; |
|
| 37 | - protected const DateTime =5; |
|
| 38 | - protected const Decimal =6; |
|
| 39 | - protected const Enum =7; |
|
| 40 | - protected const Floating =8; |
|
| 41 | - protected const Guid =9; |
|
| 42 | - protected const Integer =10; |
|
| 43 | - protected const Null =11; |
|
| 44 | - protected const String =12; |
|
| 45 | - protected const Structured =13; |
|
| 46 | - protected const Time =14; |
|
| 34 | + protected const Boolean = 2; |
|
| 35 | + protected const Collection = 3; |
|
| 36 | + protected const DateTimeOffset = 4; |
|
| 37 | + protected const DateTime = 5; |
|
| 38 | + protected const Decimal = 6; |
|
| 39 | + protected const Enum = 7; |
|
| 40 | + protected const Floating = 8; |
|
| 41 | + protected const Guid = 9; |
|
| 42 | + protected const Integer = 10; |
|
| 43 | + protected const Null = 11; |
|
| 44 | + protected const String = 12; |
|
| 45 | + protected const Structured = 13; |
|
| 46 | + protected const Time = 14; |
|
| 47 | 47 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | protected const Floating =8; |
| 41 | 41 | protected const Guid =9; |
| 42 | 42 | protected const Integer =10; |
| 43 | - protected const Null =11; |
|
| 43 | + protected const null =11; |
|
| 44 | 44 | protected const String =12; |
| 45 | 45 | protected const Structured =13; |
| 46 | 46 | protected const Time =14; |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $regexBase = '/(is)(%s)/m'; |
| 25 | 25 | $regexFull = sprintf($regexBase, implode('$|', array_keys($array))); |
| 26 | 26 | preg_match($regexFull, $name, $match); |
| 27 | - if (count($match)>0 && $match[0] === $name) { |
|
| 27 | + if (count($match) > 0 && $match[0] === $name) { |
|
| 28 | 28 | return $this->{$match[1] . 'Flag'}($array[$match[2]], $arguments[0] ?? null); |
| 29 | 29 | } |
| 30 | 30 | throw new BadMethodCallException(sprintf('Enum %s not found on %s', $name, get_class($this))); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | protected const None = null; |
| 28 | 28 | protected const TypeDefinition = 'SchemaType'; |
| 29 | - protected const Function = 'Function'; |
|
| 29 | + protected const function = 'Function'; |
|
| 30 | 30 | protected const ValueTerm = 'ValueTerm'; |
| 31 | 31 | protected const EntityContainer = 'EntityContainer'; |
| 32 | 32 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | protected const IntegerConstant = 8; |
| 80 | 80 | protected const StringConstant = 9; |
| 81 | 81 | protected const TimeConstant = 10; |
| 82 | - protected const Null = 11; |
|
| 82 | + protected const null = 11; |
|
| 83 | 83 | protected const Record = 12; |
| 84 | 84 | protected const Collection = 14; |
| 85 | 85 | protected const Path = 15; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | protected const ValueTermReference = 19; |
| 90 | 90 | protected const EntitySetReference = 20; |
| 91 | 91 | protected const EnumMemberReference = 21; |
| 92 | - protected const If = 22; |
|
| 92 | + protected const if = 22; |
|
| 93 | 93 | protected const AssertType = 23; |
| 94 | 94 | protected const IsType = 24; |
| 95 | 95 | protected const FunctionApplication = 25; |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | protected function endElement(IEdmElement $element, string $method): void |
| 119 | 119 | { |
| 120 | 120 | $method = $this->sanitizeMethodName($method); |
| 121 | - $elementClone = $this->cloneElementContainer->offsetGet($element); |
|
| 121 | + $elementClone = $this->cloneElementContainer->offsetGet($element); |
|
| 122 | 122 | foreach ($this->visitors as $visitor) { |
| 123 | 123 | $visitor->{'end' . $method}($elementClone); |
| 124 | 124 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | private static function fillVersions() |
| 69 | 69 | { |
| 70 | 70 | if (null == self::$fixedVersion) { |
| 71 | - self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2),2 => new self(2, 0), 3 => new self(3, 0)]; |
|
| 71 | + self::$fixedVersion = [1 => new self(1, 0), 11 => new self(1, 1), 12 => new self(1, 2), 2 => new self(2, 0), 3 => new self(3, 0)]; |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
@@ -91,8 +91,8 @@ |
||
| 91 | 91 | $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmxVersion(), StringConst::Serializer_UnknownEdmxVersion())]; |
| 92 | 92 | return false; |
| 93 | 93 | } |
| 94 | - } elseif (! $edmxVersion = CsdlConstants::EdmToEdmxVersions($model->GetEdmVersion() ?? Version::v3())) { |
|
| 95 | - $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion()) ]; |
|
| 94 | + } elseif (!$edmxVersion = CsdlConstants::EdmToEdmxVersions($model->GetEdmVersion() ?? Version::v3())) { |
|
| 95 | + $errors = [new EdmError(new CsdlLocation(0, 0), EdmErrorCode::UnknownEdmVersion(), StringConst::Serializer_UnknownEdmVersion())]; |
|
| 96 | 96 | return false; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -131,8 +131,7 @@ discard block |
||
| 131 | 131 | $alias = null; |
| 132 | 132 | if ($this->namespaceAliasMappings != null) { |
| 133 | 133 | $alias = array_key_exists($element->getNamespace(), $this->namespaceAliasMappings) ? |
| 134 | - $this->namespaceAliasMappings[$element->getNamespace()] : |
|
| 135 | - null; |
|
| 134 | + $this->namespaceAliasMappings[$element->getNamespace()] : null; |
|
| 136 | 135 | } |
| 137 | 136 | |
| 138 | 137 | $this->schemaWriter->WriteSchemaElementHeader($element, $alias, $mappings); |
@@ -602,7 +601,7 @@ discard block |
||
| 602 | 601 | protected function ProcessPropertyReferenceExpression(IPropertyReferenceExpression $expression): void |
| 603 | 602 | { |
| 604 | 603 | $this->BeginElement($expression, [$this->schemaWriter, 'WritePropertyReferenceExpressionElementHeader']); |
| 605 | - if ($expression->getBase()!= null) { |
|
| 604 | + if ($expression->getBase() != null) { |
|
| 606 | 605 | $this->VisitExpression($expression->getBase()); |
| 607 | 606 | } |
| 608 | 607 | |
@@ -933,7 +932,7 @@ discard block |
||
| 933 | 932 | /** |
| 934 | 933 | * @var IDirectValueAnnotation[] $end2Annotations |
| 935 | 934 | */ |
| 936 | - $end2Annotations =[]; |
|
| 935 | + $end2Annotations = []; |
|
| 937 | 936 | $this->model->GetAssociationSetAnnotations( |
| 938 | 937 | $entitySet, |
| 939 | 938 | $property, |
@@ -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, |
@@ -1337,8 +1336,8 @@ discard block |
||
| 1337 | 1336 | ); |
| 1338 | 1337 | |
| 1339 | 1338 | $thatAssociationSetAnnotations = []; |
| 1340 | - $thatEnd1Annotations =[]; |
|
| 1341 | - $thatEnd2Annotations =[]; |
|
| 1339 | + $thatEnd1Annotations = []; |
|
| 1340 | + $thatEnd2Annotations = []; |
|
| 1342 | 1341 | $this->model->GetAssociationSetAnnotations( |
| 1343 | 1342 | $thatEntitySet, |
| 1344 | 1343 | $thatNavprop, |
@@ -11,5 +11,5 @@ |
||
| 11 | 11 | |
| 12 | 12 | public $End1Annotations; |
| 13 | 13 | |
| 14 | - public $End2Annotations ; |
|
| 14 | + public $End2Annotations; |
|
| 15 | 15 | } |