@@ 113-120 (lines=8) @@ | ||
110 | } elseif (is_string($name) && count($tokens) > 1) { |
|
111 | // We are still here, but got a structure name to look for |
|
112 | ||
113 | foreach ($tokens as $key => $token) { |
|
114 | // Now iterate over the array and search for the class we want |
|
115 | for ($i = 0; $i < count($token); $i++) { |
|
116 | if (is_array($token[$i]) && $token[$i] === $this->getToken() && $token[$i + 2] === $name) { |
|
117 | return $this->getDefinitionFromTokens($tokens[$key], $getRecursive); |
|
118 | } |
|
119 | } |
|
120 | } |
|
121 | } |
|
122 | ||
123 | // Still here? Must be an error. |
@@ 132-139 (lines=8) @@ | ||
129 | ||
130 | } elseif ($tokenCount > 1) { |
|
131 | // We are still here, but got a function name to look for |
|
132 | foreach ($tokens as $token) { |
|
133 | // Now iterate over the array and search for the class we want |
|
134 | for ($i = 0; $i < count($token); $i++) { |
|
135 | if (is_array($token[$i]) && $token[$i] === T_FUNCTION && $token[$i + 2] === $functionName) { |
|
136 | return $this->getDefinitionFromTokens($token, $getRecursive); |
|
137 | } |
|
138 | } |
|
139 | } |
|
140 | } |
|
141 | ||
142 | // Still here? That sounds bad |