@@ -73,7 +73,7 @@ |
||
73 | 73 | public function XmlSerializeHasTypeAnnotation(DOMElement $thisNode): void |
74 | 74 | { |
75 | 75 | //TODO: add conext version check |
76 | - foreach($this->getTypeAnnotation() as $annotation){ |
|
76 | + foreach($this->getTypeAnnotation() as $annotation) { |
|
77 | 77 | $annotation->XmlSerialize($thisNode); |
78 | 78 | } |
79 | 79 | } |
@@ -47,10 +47,10 @@ |
||
47 | 47 | { |
48 | 48 | $base = []; |
49 | 49 | $type = $this->getType(); |
50 | - if($type instanceof IScalarType){ |
|
50 | + if($type instanceof IScalarType) { |
|
51 | 51 | $base = array_merge($base, $this->getAttributesHasFacets()); |
52 | 52 | } |
53 | - if($type instanceof INominalType){ |
|
53 | + if($type instanceof INominalType) { |
|
54 | 54 | $base[] = New AttributeContainer("Type", $type->getName()); |
55 | 55 | } |
56 | 56 | return $base; |
@@ -41,7 +41,8 @@ |
||
41 | 41 | return $this; |
42 | 42 | } |
43 | 43 | |
44 | - public function XmlSerializeHasDocumentation(\DOMElement $thisNode){ |
|
44 | + public function XmlSerializeHasDocumentation(\DOMElement $thisNode) |
|
45 | + { |
|
45 | 46 | null !== $this->getDocumentation() && $this->getDocumentation()->XmlSerialize($thisNode); |
46 | 47 | } |
47 | 48 | } |
48 | 49 | \ No newline at end of file |
@@ -11,11 +11,13 @@ |
||
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')) { |
@@ -88,7 +88,7 @@ discard block |
||
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 |
||
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 []; |
@@ -47,7 +47,7 @@ |
||
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 | ); |
@@ -47,7 +47,7 @@ |
||
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 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->expression instanceof Expressions\Constant\DecimalConstant || |
121 | 121 | $this->expression instanceof Expressions\Constant\BoolConstant || |
122 | 122 | $this->expression instanceof Expressions\Constant\DateTimeConstant |
123 | - ){ |
|
123 | + ) { |
|
124 | 124 | return [$this->expression]; |
125 | 125 | } |
126 | 126 | return []; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $this->expression instanceof Expressions\Constant\DecimalConstant || |
140 | 140 | $this->expression instanceof Expressions\Constant\BoolConstant || |
141 | 141 | $this->expression instanceof Expressions\Constant\DateTimeConstant |
142 | - )){ |
|
142 | + )) { |
|
143 | 143 | return [$this->expression]; |
144 | 144 | } |
145 | 145 | return []; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $this->expression instanceof Expressions\Constant\DecimalConstant || |
175 | 175 | $this->expression instanceof Expressions\Constant\BoolConstant || |
176 | 176 | $this->expression instanceof Expressions\Constant\DateTimeConstant |
177 | - ){ |
|
177 | + ) { |
|
178 | 178 | $base[] = $this->expression; |
179 | 179 | } |
180 | 180 | return $base; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->expression instanceof Expressions\Constant\DecimalConstant || |
194 | 194 | $this->expression instanceof Expressions\Constant\BoolConstant || |
195 | 195 | $this->expression instanceof Expressions\Constant\DateTimeConstant |
196 | - )){ |
|
196 | + )) { |
|
197 | 197 | return [$this->expression]; |
198 | 198 | } |
199 | 199 | return []; |