Completed
Push — master ( c2b7a1...66c45a )
by Alex
19s queued 14s
created
src/Csdl/EdmxWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Helpers/VocabularyAnnotationHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
          * @var IVocabularyAnnotation $annotation
45 45
          */
46 46
         $annotation = $this;
47
-        $model->SetAnnotationValue($annotation, EdmConstants::InternalUri, CsdlConstants::AnnotationSerializationLocationAnnotation, (object)$location);
47
+        $model->SetAnnotationValue($annotation, EdmConstants::InternalUri, CsdlConstants::AnnotationSerializationLocationAnnotation, (object) $location);
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
src/Helpers/PrimitiveTypeReferenceHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,6 @@
 block discarded – undo
38 38
     public function PrimitiveKind(): PrimitiveTypeKind
39 39
     {
40 40
         $primitive = $this->PrimitiveDefinition();
41
-        return $primitive !== null ? $primitive->getPrimitiveKind(): PrimitiveTypeKind::None();
41
+        return $primitive !== null ? $primitive->getPrimitiveKind() : PrimitiveTypeKind::None();
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
src/Helpers/ToTraceString.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             case $element instanceof IProperty:
50 50
                 assert($element instanceof IProperty);
51 51
                 $type = $element->getType();
52
-                return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) :'');
52
+                return $element->getName() ?? '' . ':' . ($type !== null ? self::ToTraceString($type) : '');
53 53
             case $element instanceof IEntityReferenceType:
54 54
                 assert($element instanceof IEntityReferenceType);
55 55
                 return TypeKind::EntityReference()->getKey() . '(' . ($element->getEntityType() !== null ? self::ToTraceString($element->getEntityType()) : '') . ')';
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
     private static function AppendSpatialFacets(string $sb, ISpatialTypeReference $type): string
168 168
     {
169
-        $sb = self::AppendKeyValue($sb, EdmConstants::FacetName_Srid, $type->getSpatialReferenceIdentifier() != null ? $type->getSpatialReferenceIdentifier(): EdmConstants::Value_SridVariable);
169
+        $sb = self::AppendKeyValue($sb, EdmConstants::FacetName_Srid, $type->getSpatialReferenceIdentifier() != null ? $type->getSpatialReferenceIdentifier() : EdmConstants::Value_SridVariable);
170 170
         return $sb;
171 171
     }
172 172
 
Please login to merge, or discard this patch.
src/EdmModelVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     protected function endElement(IEdmElement $element, string $method): void
117 117
     {
118 118
         $method       = $this->sanitizeMethodName($method);
119
-        $elementClone =  $this->cloneElementContainer->offsetGet($element);
119
+        $elementClone = $this->cloneElementContainer->offsetGet($element);
120 120
         foreach ($this->visitors as $visitor) {
121 121
             $visitor->{'end' . $method}($elementClone);
122 122
         }
Please login to merge, or discard this patch.
src/Internal/RegistrationHelper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     ) {
48 48
         $qualifiedName = $element->FullName();
49 49
         switch ($element->getSchemaElementKind()) {
50
-            case SchemaElementKind::Function():
50
+            case SchemaElementKind::Function ():
51 51
                 assert($element instanceof IFunction);
52 52
                 self::AddFunction($element, $qualifiedName, $functionGroupDictionary);
53 53
                 break;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     ) {
48 48
         $qualifiedName = $element->FullName();
49 49
         switch ($element->getSchemaElementKind()) {
50
-            case SchemaElementKind::Function():
50
+            case SchemaElementKind::function():
51 51
                 assert($element instanceof IFunction);
52 52
                 self::AddFunction($element, $qualifiedName, $functionGroupDictionary);
53 53
                 break;
Please login to merge, or discard this patch.
src/Helpers/EdmElementComparer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $thisTypeKeys  = array_keys($thisFunction->getParameters());
145 145
         $otherTypeKeys = array_keys($otherFunction->getParameters());
146
-        $keyCount      =  count($thisTypeKeys);
146
+        $keyCount      = count($thisTypeKeys);
147 147
         for ($i = 0; $i < $keyCount; ++$i) {
148 148
             if (
149 149
             !self::isEquivalentTo(
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         $thisTypeKeys  = array_keys($thisType->getDeclaredProperties());
213 213
         $otherTypeKeys = array_keys($otherType->getDeclaredProperties());
214
-        $keyCount      =  count($thisTypeKeys);
214
+        $keyCount      = count($thisTypeKeys);
215 215
         for ($i = 0; $i < $keyCount; ++$i) {
216 216
             if (
217 217
             !self::isEquivalentTo(
Please login to merge, or discard this patch.
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.