| @@ 165-172 (lines=8) @@ | ||
| 162 | } |
|
| 163 | } |
|
| 164 | } |
|
| 165 | if ($tokens[$i][0] === T_CLASS) { |
|
| 166 | for ($j = $i + 1; $j < count($tokens); $j++) { |
|
| 167 | if ($tokens[$j] === '{') { |
|
| 168 | $class = $tokens[$i + 2][1]; |
|
| 169 | $classes[] = $class; |
|
| 170 | } |
|
| 171 | } |
|
| 172 | } |
|
| 173 | if ($tokens[$i][0] === T_INTERFACE) { |
|
| 174 | for ($j = $i + 1; $j < count($tokens); $j++) { |
|
| 175 | if ($tokens[$j] === '{') { |
|
| @@ 173-180 (lines=8) @@ | ||
| 170 | } |
|
| 171 | } |
|
| 172 | } |
|
| 173 | if ($tokens[$i][0] === T_INTERFACE) { |
|
| 174 | for ($j = $i + 1; $j < count($tokens); $j++) { |
|
| 175 | if ($tokens[$j] === '{') { |
|
| 176 | $interface = $tokens[$i + 2][1]; |
|
| 177 | $interfaces[] = $interface; |
|
| 178 | } |
|
| 179 | } |
|
| 180 | } |
|
| 181 | if ($tokens[$i][0] === T_TRAIT) { |
|
| 182 | for ($j = $i + 1; $j < count($tokens); $j++) { |
|
| 183 | if ($tokens[$j] === '{') { |
|
| @@ 181-188 (lines=8) @@ | ||
| 178 | } |
|
| 179 | } |
|
| 180 | } |
|
| 181 | if ($tokens[$i][0] === T_TRAIT) { |
|
| 182 | for ($j = $i + 1; $j < count($tokens); $j++) { |
|
| 183 | if ($tokens[$j] === '{') { |
|
| 184 | $trait = $tokens[$i + 2][1]; |
|
| 185 | $traits[] = $trait; |
|
| 186 | } |
|
| 187 | } |
|
| 188 | } |
|
| 189 | } |
|
| 190 | } |
|
| 191 | return compact('namespace', 'classes', 'traits', 'interfaces'); |
|