| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | trait FunctionTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Get a function name. |
||
| 14 | * |
||
| 15 | * @param File $file |
||
| 16 | * @param int $functionIndex |
||
| 17 | * |
||
| 18 | * @return bool|string |
||
| 19 | */ |
||
| 20 | protected function getFunctionName(File $file, $functionIndex) |
||
| 21 | { |
||
| 22 | $index = $this->findFunctionNameIndex($file, $functionIndex); |
||
| 23 | return $index |
||
| 24 | ? $file->getTokens()[$index]['content'] |
||
| 25 | : false; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Find the function name index. |
||
| 30 | * |
||
| 31 | * @param File $file |
||
| 32 | * @param int $functionIndex |
||
| 33 | * |
||
| 34 | * @return bool|int |
||
| 35 | */ |
||
| 36 | protected function findFunctionNameIndex(File $file, $functionIndex) |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Find the start of a function body. |
||
| 43 | * |
||
| 44 | * @param File $file |
||
| 45 | * @param int $functionIndex |
||
| 46 | * |
||
| 47 | * @return bool|int |
||
| 48 | */ |
||
| 49 | protected function findFunctionBodyStartIndex(File $file, $functionIndex) |
||
| 54 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths