@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | public static function register(bool $bForce = false) |
68 | 68 | { |
69 | 69 | $di = jaxon()->di(); |
70 | - if(!$bForce && $di->h(AnnotationReader::class)) |
|
70 | + if (!$bForce && $di->h(AnnotationReader::class)) |
|
71 | 71 | { |
72 | 72 | return; |
73 | 73 | } |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | }); |
95 | 95 | |
96 | 96 | $aAttributes = []; |
97 | - foreach($aAnnotations as $xAnnotation) |
|
97 | + foreach ($aAnnotations as $xAnnotation) |
|
98 | 98 | { |
99 | 99 | $sName = $xAnnotation->getName(); |
100 | - if(isset($aAttributes[$sName])) |
|
100 | + if (isset($aAttributes[$sName])) |
|
101 | 101 | { |
102 | 102 | $xAnnotation->setPrevValue($aAttributes[$sName]); |
103 | 103 | } |
104 | 104 | $xValue = $xAnnotation->getValue(); |
105 | - if($sName === 'protected' && !$xValue) |
|
105 | + if ($sName === 'protected' && !$xValue) |
|
106 | 106 | { |
107 | 107 | continue; // Ignore annotation @exclude with value false |
108 | 108 | } |
@@ -126,34 +126,34 @@ discard block |
||
126 | 126 | { |
127 | 127 | // Class annotations |
128 | 128 | $aClassAttrs = $this->filterAnnotations($this->xManager->getClassAnnotations($sClass)); |
129 | - if(isset($aClassAttrs['protected'])) |
|
129 | + if (isset($aClassAttrs['protected'])) |
|
130 | 130 | { |
131 | 131 | return [true, [], []]; // The entire class is not to be exported. |
132 | 132 | } |
133 | 133 | |
134 | 134 | $aProtected = []; |
135 | 135 | $aAttributes = []; |
136 | - if(count($aClassAttrs) > 0) |
|
136 | + if (count($aClassAttrs) > 0) |
|
137 | 137 | { |
138 | 138 | $aAttributes['*'] = $aClassAttrs; |
139 | 139 | } |
140 | 140 | |
141 | 141 | // Methods annotations |
142 | - foreach($aMethods as $sMethod) |
|
142 | + foreach ($aMethods as $sMethod) |
|
143 | 143 | { |
144 | 144 | $aMethodAttrs = $this->filterAnnotations($this->xManager->getMethodAnnotations($sClass, $sMethod)); |
145 | - if(isset($aMethodAttrs['protected'])) |
|
145 | + if (isset($aMethodAttrs['protected'])) |
|
146 | 146 | { |
147 | 147 | $aProtected[] = $sMethod; // The method is not to be exported. |
148 | 148 | } |
149 | - elseif(count($aMethodAttrs) > 0) |
|
149 | + elseif (count($aMethodAttrs) > 0) |
|
150 | 150 | { |
151 | 151 | $aAttributes[$sMethod] = $aMethodAttrs; |
152 | 152 | } |
153 | 153 | } |
154 | 154 | return [false, $aAttributes, $aProtected]; |
155 | 155 | } |
156 | - catch(AnnotationException $e) |
|
156 | + catch (AnnotationException $e) |
|
157 | 157 | { |
158 | 158 | throw new SetupException($e->getMessage()); |
159 | 159 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function initAnnotation(array $properties) |
48 | 48 | { |
49 | - if(count($properties) != 2 || |
|
49 | + if (count($properties) != 2 || |
|
50 | 50 | !isset($properties['attr']) || !is_string($properties['attr']) || |
51 | 51 | !isset($properties['class']) || !is_string($properties['class'])) |
52 | 52 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getValue() |
72 | 72 | { |
73 | - if(is_array($this->xPrevValue)) |
|
73 | + if (is_array($this->xPrevValue)) |
|
74 | 74 | { |
75 | 75 | $this->xPrevValue[$this->sAttr] = $this->sClass; // Append the current value to the array |
76 | 76 | return $this->xPrevValue; |