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