Passed
Pull Request — master (#40)
by Alex
03:15
created
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIFunctionImport.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@
 block discarded – undo
12 12
     protected function VisitT($functionImport, array &$followup, array &$references): iterable
13 13
     {
14 14
         assert($functionImport instanceof IFunctionImport);
15
-        if ($functionImport->getEntitySet() != null)
16
-        {
15
+        if ($functionImport->getEntitySet() != null) {
17 16
             $followup[] = $functionImport->getEntitySet();
18 17
         }
19 18
 
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIFunction.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($function instanceof IFunction);
16 16
         // No need to return the return type as followup - it is handled as such in the IFunctionBase visitor.
17
-        return ($function->getParameters() === null) ? [ InterfaceValidator::CreatePropertyMustNotBeNullError($function, "ReturnType") ] : null;
17
+        return ($function->getParameters() === null) ? [InterfaceValidator::CreatePropertyMustNotBeNullError($function, "ReturnType")] : null;
18 18
     }
19 19
 
20 20
     public function forType(): string
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfISpatialTypeReference.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
         assert($typeRef instanceof ISpatialTypeReference);
18 18
         $primitive = $typeRef->getDefinition();
19 19
         assert($primitive instanceof IPrimitiveType);
20
-        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsSpatial() ? [ InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef) ] : null;
20
+        return $typeRef->getDefinition() != null && !$primitive->getPrimitiveKind()->IsSpatial() ? [InterfaceValidator::CreateTypeRefInterfaceTypeKindValueMismatchError($typeRef)] : null;
21 21
     }
22 22
 
23 23
     public function forType(): string
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfIPropertyValueBinding.php 1 patch
Braces   +4 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,12 +15,9 @@  discard block
 block discarded – undo
15 15
         assert($binding instanceof IPropertyValueBinding);
16 16
         $errors = null;
17 17
 
18
-        if ($binding->getValue() != null)
19
-        {
18
+        if ($binding->getValue() != null) {
20 19
             $followup[] = $binding->getValue();
21
-        }
22
-        else
23
-        {
20
+        } else {
24 21
             InterfaceValidator::CollectErrors(
25 22
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
26 23
                     $binding,
@@ -29,12 +26,9 @@  discard block
 block discarded – undo
29 26
             );
30 27
         }
31 28
 
32
-        if ($binding->getBoundProperty() != null)
33
-        {
29
+        if ($binding->getBoundProperty() != null) {
34 30
             $references[] = $binding->getBoundProperty();
35
-        }
36
-        else
37
-        {
31
+        } else {
38 32
             InterfaceValidator::CollectErrors(
39 33
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
40 34
                     $binding,
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIFunctionReferenceExpression.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         }
26 26
         else
27 27
         {
28
-            return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedFunction") ];
28
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedFunction")];
29 29
         }
30 30
     }
31 31
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,16 +15,13 @@
 block discarded – undo
15 15
     protected function VisitT($expression, array &$followup, array &$references): iterable
16 16
     {
17 17
         assert($expression instanceof IFunctionReferenceExpression);
18
-        if ($expression->getReferencedFunction() != null)
19
-        {
18
+        if ($expression->getReferencedFunction() != null) {
20 19
             assert($expression->getReferencedFunction() instanceof ISchemaElement ||
21 20
                 $expression instanceof IEntityContainerElement,
22 21
                 "Return as followup if the referenced object is not a schema function or a function import.");
23 22
             $references[] = $expression->getReferencedFunction();
24 23
             return null;
25
-        }
26
-        else
27
-        {
24
+        } else {
28 25
             return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedFunction") ];
29 26
         }
30 27
     }
Please login to merge, or discard this patch.
src/Edm/Validation/Internal/InterfaceValidator/VisitorOfIValue.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         {
40 40
             case ValueKind::Binary():
41 41
                 InterfaceValidator::CollectErrors(
42
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
42
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
43 43
                         $value,
44 44
                         $value->getValueKind(),
45 45
                         "ValueKind",
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
             case ValueKind::Boolean():
53 53
                 InterfaceValidator::CollectErrors(
54
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
54
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
55 55
                         $value,
56 56
                         $value->getValueKind(),
57 57
                         "ValueKind",
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
             case ValueKind::Collection():
65 65
                 InterfaceValidator::CollectErrors(
66
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
66
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
67 67
                         $value,
68 68
                         $value->getValueKind(),
69 69
                         "ValueKind",
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             case ValueKind::DateTime():
77 77
                 InterfaceValidator::CollectErrors(
78
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
78
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
79 79
                         $value,
80 80
                         $value->getValueKind(),
81 81
                         "ValueKind",
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
             case ValueKind::DateTimeOffset():
89 89
                 InterfaceValidator::CollectErrors(
90
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
90
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
91 91
                         $value,
92 92
                         $value->getValueKind(),
93 93
                         "ValueKind",
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
             case ValueKind::Decimal():
101 101
                 InterfaceValidator::CollectErrors(
102
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
102
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
103 103
                         $value,
104 104
                         $value->getValueKind(),
105 105
                         "ValueKind",
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
             case ValueKind::Enum():
113 113
                 InterfaceValidator::CollectErrors(
114
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
114
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
115 115
                         $value,
116 116
                         $value->getValueKind(),
117 117
                         "ValueKind",
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
             case ValueKind::Floating():
125 125
                 InterfaceValidator::CollectErrors(
126
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
126
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
127 127
                         $value,
128 128
                         $value->getValueKind(),
129 129
                         "ValueKind",
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
             case ValueKind::Guid():
137 137
                 InterfaceValidator::CollectErrors(
138
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
138
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
139 139
                         $value,
140 140
                         $value->getValueKind(),
141 141
                         "ValueKind",
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
             case ValueKind::Integer():
149 149
                 InterfaceValidator::CollectErrors(
150
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
150
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
151 151
                         $value,
152 152
                         $value->getValueKind(),
153 153
                         "ValueKind",
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
             case ValueKind::Null():
161 161
                 InterfaceValidator::CollectErrors(
162
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
162
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
163 163
                         $value,
164 164
                         $value->getValueKind(),
165 165
                         "ValueKind",
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
             case ValueKind::String():
173 173
                 InterfaceValidator::CollectErrors(
174
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
174
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
175 175
                         $value,
176 176
                         $value->getValueKind(),
177 177
                         "ValueKind",
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
             case ValueKind::Structured():
185 185
                 InterfaceValidator::CollectErrors(
186
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
186
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
187 187
                         $value,
188 188
                         $value->getValueKind(),
189 189
                         "ValueKind",
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
             case ValueKind::Time():
197 197
                 InterfaceValidator::CollectErrors(
198
-                    InterfaceValidator::CheckForInterfaceKindValueMismatchError (
198
+                    InterfaceValidator::CheckForInterfaceKindValueMismatchError(
199 199
                         $value,
200 200
                         $value->getValueKind(),
201 201
                         "ValueKind",
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,14 +29,12 @@
 block discarded – undo
29 29
     {
30 30
         assert($value instanceof IValue);
31 31
         $errors = null;
32
-        if ($value->getType() != null)
33
-        {
32
+        if ($value->getType() != null) {
34 33
             // Value owns its type reference, so it goes as a followup.
35 34
             $followup[] = $value->getType();
36 35
         }
37 36
 
38
-        switch ($value->getValueKind())
39
-        {
37
+        switch ($value->getValueKind()) {
40 38
             case ValueKind::Binary():
41 39
                 InterfaceValidator::CollectErrors(
42 40
                     InterfaceValidator::CheckForInterfaceKindValueMismatchError (
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
                 );
158 158
                 break;
159 159
 
160
-            case ValueKind::Null():
160
+            case ValueKind::null():
161 161
                 InterfaceValidator::CollectErrors(
162 162
                     InterfaceValidator::CheckForInterfaceKindValueMismatchError (
163 163
                         $value,
Please login to merge, or discard this patch.
Internal/InterfaceValidator/VisitorOfIEnumMemberReferenceExpression.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         }
21 21
         else
22 22
         {
23
-            return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedEnumMember") ];
23
+            return [InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedEnumMember")];
24 24
         }
25 25
     }
26 26
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,13 +13,10 @@
 block discarded – undo
13 13
     protected function VisitT($expression, array &$followup, array &$references): iterable
14 14
     {
15 15
         assert($expression instanceof IEnumMemberReferenceExpression);
16
-        if ($expression->getReferencedEnumMember() != null)
17
-        {
16
+        if ($expression->getReferencedEnumMember() != null) {
18 17
             $references[] = $expression->getReferencedEnumMember();
19 18
             return null;
20
-        }
21
-        else
22
-        {
19
+        } else {
23 20
             return [ InterfaceValidator::CreatePropertyMustNotBeNullError($expression, "ReferencedEnumMember") ];
24 21
         }
25 22
     }
Please login to merge, or discard this patch.
Validation/Internal/InterfaceValidator/VisitorOfIDirectValueAnnotation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
         assert($annotation instanceof IDirectValueAnnotation);
16 16
         $errors = null;
17 17
 
18
-        if ($annotation->getNamespaceUri() == null)
19
-        {
18
+        if ($annotation->getNamespaceUri() == null) {
20 19
             InterfaceValidator::CollectErrors(
21 20
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
22 21
                     $annotation,
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
             );
27 26
         }
28 27
 
29
-        if ($annotation->getValue() == null)
30
-        {
28
+        if ($annotation->getValue() == null) {
31 29
             InterfaceValidator::CollectErrors(
32 30
                 InterfaceValidator::CreatePropertyMustNotBeNullError(
33 31
                     $annotation,
Please login to merge, or discard this patch.
Edm/Validation/Internal/InterfaceValidator/VisitorOfIRecordExpression.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
 
18 18
         InterfaceValidator::ProcessEnumerable($expression, $expression->getProperties(), "Properties", $followup, $errors);
19 19
 
20
-        if ($expression->getDeclaredType() != null)
21
-        {
20
+        if ($expression->getDeclaredType() != null) {
22 21
             // Record constructor owns its type reference, so it goes as a followup.
23 22
             $followup[] = $expression->getDeclaredType();
24 23
         }
Please login to merge, or discard this patch.