Passed
Push — main ( ac358a...2090ca )
by Thierry
01:47
created
src/AnnotationReader.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
         $this->xManager->registry['upload'] = UploadAnnotation::class;
48 48
         $this->xManager->registry['databag'] = DataBagAnnotation::class;
49 49
         $this->xManager->registry['exclude'] = ExcludeAnnotation::class;
50
-        $this->xManager->registry['before'] = BeforeAnnotation::class;;
51
-        $this->xManager->registry['after'] = AfterAnnotation::class;;
50
+        $this->xManager->registry['before'] = BeforeAnnotation::class; ;
51
+        $this->xManager->registry['after'] = AfterAnnotation::class; ;
52 52
         // Missing standard annotations.
53 53
         // We need to define this, otherwise they throw an exception, and make the whole processing fail.
54 54
         $this->xManager->registry['const'] = false;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     public static function register(bool $bForce = false)
66 66
     {
67 67
         $di = jaxon()->di();
68
-        if(!$bForce && $di->h(AnnotationReader::class))
68
+        if (!$bForce && $di->h(AnnotationReader::class))
69 69
         {
70 70
             return;
71 71
         }
@@ -92,15 +92,15 @@  discard block
 block discarded – undo
92 92
         });
93 93
 
94 94
         $aAttributes = [];
95
-        foreach($aAnnotations as $xAnnotation)
95
+        foreach ($aAnnotations as $xAnnotation)
96 96
         {
97 97
             $sName = $xAnnotation->getName();
98
-            if(isset($aAttributes[$sName]))
98
+            if (isset($aAttributes[$sName]))
99 99
             {
100 100
                 $xAnnotation->setPrevValue($aAttributes[$sName]);
101 101
             }
102 102
             $xValue = $xAnnotation->getValue();
103
-            if($sName === 'protected' && !$xValue)
103
+            if ($sName === 'protected' && !$xValue)
104 104
             {
105 105
                 continue; // Ignore annotation @exclude with value false
106 106
             }
@@ -124,34 +124,34 @@  discard block
 block discarded – undo
124 124
         {
125 125
             // Class annotations
126 126
             $aClassAttrs = $this->filterAnnotations($this->xManager->getClassAnnotations($sClass));
127
-            if(isset($aClassAttrs['protected']))
127
+            if (isset($aClassAttrs['protected']))
128 128
             {
129 129
                 return [true, [], []]; // The entire class is not to be exported.
130 130
             }
131 131
 
132 132
             $aProtected = [];
133 133
             $aAttributes = [];
134
-            if(count($aClassAttrs) > 0)
134
+            if (count($aClassAttrs) > 0)
135 135
             {
136 136
                 $aAttributes['*'] = $aClassAttrs;
137 137
             }
138 138
 
139 139
             // Methods annotations
140
-            foreach($aMethods as $sMethod)
140
+            foreach ($aMethods as $sMethod)
141 141
             {
142 142
                 $aMethodAttrs = $this->filterAnnotations($this->xManager->getMethodAnnotations($sClass, $sMethod));
143
-                if(isset($aMethodAttrs['protected']))
143
+                if (isset($aMethodAttrs['protected']))
144 144
                 {
145 145
                     $aProtected[] = $sMethod; // The method is not to be exported.
146 146
                 }
147
-                elseif(count($aMethodAttrs) > 0)
147
+                elseif (count($aMethodAttrs) > 0)
148 148
                 {
149 149
                     $aAttributes[$sMethod] = $aMethodAttrs;
150 150
                 }
151 151
             }
152 152
             return [false, $aAttributes, $aProtected];
153 153
         }
154
-        catch(AnnotationException $e)
154
+        catch (AnnotationException $e)
155 155
         {
156 156
             throw new SetupException($e->getMessage());
157 157
         }
Please login to merge, or discard this patch.