Test Failed
Pull Request — master (#152)
by Alex
02:46
created
src/MetadataV3/edm/EdmBase.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,12 +11,12 @@
 block discarded – undo
11 11
 
12 12
 abstract class EdmBase extends DomBase
13 13
 {
14
-    protected function completelyMatchesPattern($str, $pattern){
14
+    protected function completelyMatchesPattern($str, $pattern) {
15 15
         return preg_match($pattern, $str, $matches) === 1 && $matches[0] === $str;
16 16
     }
17 17
 
18
-    protected function elementToNamedArray (array $raw){
19
-        return array_reduce($raw, function($carry, $item) {
18
+    protected function elementToNamedArray(array $raw) {
19
+        return array_reduce($raw, function ($carry, $item) {
20 20
 
21 21
             if (!method_exists($item, 'getName')) {
22 22
                 throw new \InvalidArgumentException('attempted to a none named element to a named array');
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,13 @@
 block discarded – undo
11 11
 
12 12
 abstract class EdmBase extends DomBase
13 13
 {
14
-    protected function completelyMatchesPattern($str, $pattern){
14
+    protected function completelyMatchesPattern($str, $pattern)
15
+    {
15 16
         return preg_match($pattern, $str, $matches) === 1 && $matches[0] === $str;
16 17
     }
17 18
 
18
-    protected function elementToNamedArray (array $raw){
19
+    protected function elementToNamedArray (array $raw)
20
+    {
19 21
         return array_reduce($raw, function($carry, $item) {
20 22
 
21 23
             if (!method_exists($item, 'getName')) {
Please login to merge, or discard this patch.
src/MetadataV3/edm/OtherTypeConstructs/TypeRef.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
             new AttributeContainer('Type', $this->getType()->getName())
97 97
         ];
98 98
         return $this->getType() instanceof IScalarType ?
99
-            array_merge($this->getAttributesHasFacets(),$baseAttribute) :
100
-            $baseAttribute;
99
+            array_merge($this->getAttributesHasFacets(), $baseAttribute) : $baseAttribute;
101 100
     }
102 101
 
103 102
     /**
Please login to merge, or discard this patch.
src/MetadataV3/edm/OtherTypeConstructs/RowType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
     public function offsetExists($offset): bool
62 62
     {
63
-        return array_key_exists($offset,$this->propertyTypes);
63
+        return array_key_exists($offset, $this->propertyTypes);
64 64
     }
65 65
 
66 66
     public function offsetGet($offset): Property
Please login to merge, or discard this patch.
src/MetadataV3/edm/OtherTypeConstructs/CollectionType.php 2 patches
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
     public function getAttributes(): array
87 87
     {
88 88
         $containerFor = $this->getContainerFor();
89
-        if(
89
+        if (
90 90
             $containerFor instanceof IStructuralTypes
91
-        ){
91
+        ) {
92 92
             return [];
93 93
         }
94 94
 
@@ -96,8 +96,7 @@  discard block
 block discarded – undo
96 96
             new AttributeContainer('Type', strval($containerFor))
97 97
         ];
98 98
         return $containerFor instanceof IScalarType ?
99
-            array_merge($this->getAttributesHasFacets(),$baseAttribute) :
100
-            $baseAttribute;
99
+            array_merge($this->getAttributesHasFacets(), $baseAttribute) : $baseAttribute;
101 100
     }
102 101
 
103 102
     /**
@@ -106,12 +105,12 @@  discard block
 block discarded – undo
106 105
     public function getChildElements(): array
107 106
     {
108 107
         $containerFor = $this->getContainerFor();
109
-        if(
108
+        if (
110 109
             $containerFor instanceof CollectionType ||
111 110
             $containerFor instanceof ReferenceType ||
112 111
             $containerFor instanceof RowType ||
113 112
             $containerFor instanceof TypeRef
114
-        ){
113
+        ) {
115 114
             return [$this->containerFor];
116 115
         }
117 116
         return [];
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $containerFor = $this->getContainerFor();
89 89
         if(
90 90
             $containerFor instanceof IStructuralTypes
91
-        ){
91
+        ) {
92 92
             return [];
93 93
         }
94 94
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             $containerFor instanceof ReferenceType ||
112 112
             $containerFor instanceof RowType ||
113 113
             $containerFor instanceof TypeRef
114
-        ){
114
+        ) {
115 115
             return [$this->containerFor];
116 116
         }
117 117
         return [];
Please login to merge, or discard this patch.
src/MetadataV3/edm/OtherTypeConstructs/RowType/Property.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
     public function getAttributes(): array
104 104
     {
105 105
         return array_merge(
106
-            [new AttributeContainer('Name', $this->getName(),true)],
106
+            [new AttributeContainer('Name', $this->getName(), true)],
107 107
             $this->getAttributesHasType()
108 108
         );
109 109
     }
Please login to merge, or discard this patch.
src/MetadataV3/edm/Expressions/Constant/GuidConstant.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     {
47 47
         if (null !== $value) {
48 48
             $hexPattern = '[a-fA-F0-9]';
49
-            $guidPattern = sprintf('/%1$s{8}-%1$s{4}-%1$s{4}-%1$s{4}-%1$s{12}/m',$hexPattern);
50
-            if(!$this->completelyMatchesPattern($value,$guidPattern)){
49
+            $guidPattern = sprintf('/%1$s{8}-%1$s{4}-%1$s{4}-%1$s{4}-%1$s{12}/m', $hexPattern);
50
+            if (!$this->completelyMatchesPattern($value, $guidPattern)) {
51 51
                 throw new InvalidArgumentException(
52 52
                     sprintf("%s Should be assigned strings matching %s", __CLASS__, $guidPattern)
53 53
                 );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         if (null !== $value) {
48 48
             $hexPattern = '[a-fA-F0-9]';
49 49
             $guidPattern = sprintf('/%1$s{8}-%1$s{4}-%1$s{4}-%1$s{4}-%1$s{12}/m',$hexPattern);
50
-            if(!$this->completelyMatchesPattern($value,$guidPattern)){
50
+            if(!$this->completelyMatchesPattern($value,$guidPattern)) {
51 51
                 throw new InvalidArgumentException(
52 52
                     sprintf("%s Should be assigned strings matching %s", __CLASS__, $guidPattern)
53 53
                 );
Please login to merge, or discard this patch.
src/MetadataV3/edm/Expressions/Constant/BinaryConstant.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
         if (null !== $value) {
48 48
             // stripe any white space
49 49
             $value = preg_replace('/\s+/', '', $value);
50
-            if(!ctype_xdigit($value)){
50
+            if (!ctype_xdigit($value)) {
51 51
                 throw new InvalidArgumentException(
52 52
                     sprintf("values assigned %s to should be hexadecimal string", __CLASS__));
53 53
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         if (null !== $value) {
48 48
             // stripe any white space
49 49
             $value = preg_replace('/\s+/', '', $value);
50
-            if(!ctype_xdigit($value)){
50
+            if(!ctype_xdigit($value)) {
51 51
                 throw new InvalidArgumentException(
52 52
                     sprintf("values assigned %s to should be hexadecimal string", __CLASS__));
53 53
             }
Please login to merge, or discard this patch.
src/MetadataV3/edm/Expressions/Dynamic/TIfExpressionType.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
  * @link https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-csdl/120e2b40-c73a-4b0b-98c2-8d2ab6b8dfd3
37 37
  * XSD Type: TIfExpression
38 38
  */
39
-class TIfExpressionType extends DynamicBase{
39
+class TIfExpressionType extends DynamicBase {
40 40
     /**
41 41
      * @var string[] $string
42 42
      */
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
  * @link https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-csdl/120e2b40-c73a-4b0b-98c2-8d2ab6b8dfd3
37 37
  * XSD Type: TIfExpression
38 38
  */
39
-class TIfExpressionType extends DynamicBase{
39
+class TIfExpressionType extends DynamicBase
40
+{
40 41
     /**
41 42
      * @var string[] $string
42 43
      */
Please login to merge, or discard this patch.
src/MetadataV3/edm/Enum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
      * @param bool $isFlags
123 123
      * @return self
124 124
      */
125
-    public function setIsFlags( bool $isFlags):self
125
+    public function setIsFlags(bool $isFlags):self
126 126
     {
127 127
         $this->isFlags = $isFlags;
128 128
         return $this;
Please login to merge, or discard this patch.