Completed
Pull Request — master (#44)
by Alex
03:25
created
src/Helpers/ModelHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     // Otherwise, changes to the dictionary durring serialization would result in an invalid or inconsistent output.
43 43
     public function GetNamespaceAliases(): array
44 44
     {
45
-        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ??[];
45
+        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespaceAliasAnnotation) ?? [];
46 46
     }
47 47
     /**
48 48
      * Sets an annotation value for an EDM element. If the value is null, no annotation is added and an existing
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function GetNamespacePrefixMappings(): array
249 249
     {
250
-        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation)??[];
250
+        return $this->GetAnnotationValue('array', $this, EdmConstants::InternalUri, CsdlConstants::NamespacePrefixAnnotation) ?? [];
251 251
     }
252 252
 
253 253
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         $navigationPropertyMappings = $model->GetAnnotationValue(SplObjectStorage::class, $entitySet, EdmConstants::InternalUri, CsdlConstants::AssociationSetNameAnnotation);
400 400
         assert($navigationPropertyMappings instanceof SplObjectStorage || $navigationPropertyMappings === null);
401 401
         if ($navigationPropertyMappings !== null && $navigationPropertyMappings->offsetExists($property)) {
402
-            $associationSetName = $navigationPropertyMappings->offsetGet($property) ;
402
+            $associationSetName = $navigationPropertyMappings->offsetGet($property);
403 403
         } else {
404 404
             $associationSetName = $model->GetAssociationName($property) . 'Set';
405 405
         }
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfINavigationProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             if (!in_array($property->getPartner(), $property->getPartner()->getDeclaringType()->getDeclaredProperties())) {
25 25
                 $followup[] = $property->getPartner();
26 26
             } else {
27
-                $references[] =$property->getPartner();
27
+                $references[] = $property->getPartner();
28 28
             }
29 29
 
30 30
             if ($property->getPartner()->getPartner() !== $property || $property->getPartner() === $property) {
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIParameterReferenceExpression.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             $references[] = $expression->getReferencedParameter();
18 18
             return null;
19 19
         } else {
20
-            return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedParameter') ];
20
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedParameter')];
21 21
         }
22 22
     }
23 23
 
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfICollectionTypeReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         assert($typeRef instanceof ICollectionTypeReference);
16 16
         return $typeRef->getDefinition() != null &&
17 17
         !$typeRef->getDefinition()->getTypeKind()->IsCollection() ?
18
-            [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)]: null;
18
+            [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
19 19
     }
20 20
 
21 21
     public function forType(): string
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIBinaryValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         assert($value instanceof IBinaryValue);
16 16
         return $value->getValue() == null ?
17
-            [InterfaceValidator::CreatePropertyMustNotBeNullError($value, 'Value') ]
17
+            [InterfaceValidator::CreatePropertyMustNotBeNullError($value, 'Value')]
18 18
             :
19 19
             null;
20 20
     }
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfISchemaElement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     protected function VisitT($item, array &$followup, array &$references): iterable
19 19
     {
20 20
         assert($item instanceof ISchemaElement);
21
-        $errors =[];
21
+        $errors = [];
22 22
 
23 23
         switch ($item->getSchemaElementKind()) {
24 24
                     case SchemaElementKind::TypeDefinition():
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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,
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIEnumMemberReferenceExpression.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
             $references[] = $expression->getReferencedEnumMember();
18 18
             return null;
19 19
         } else {
20
-            return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedEnumMember') ];
20
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, 'ReferencedEnumMember')];
21 21
         }
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIPropertyValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         assert($value instanceof IPropertyValue);
16 16
         return $value->getName() == null ?
17
-            [ InterfaceValidator::CreatePropertyMustNotBeNullError($value, 'Name') ]
17
+            [InterfaceValidator::CreatePropertyMustNotBeNullError($value, 'Name')]
18 18
             :
19 19
             null;
20 20
     }
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIPrimitiveType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
                 $type->getPrimitiveKind()->getValue() > PrimitiveTypeKind::GeometryMultiPoint()->getValue()
23 23
             )
24 24
         ) {
25
-            return [InterfaceValidator::CreateInterfaceKindValueUnexpectedError($type, $type->getPrimitiveKind()->getKey(), 'PrimitiveKind') ];
25
+            return [InterfaceValidator::CreateInterfaceKindValueUnexpectedError($type, $type->getPrimitiveKind()->getKey(), 'PrimitiveKind')];
26 26
         } else {
27 27
             return null;
28 28
         }
Please login to merge, or discard this patch.