| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 62 | protected function _onSetupAdmin(AppController $controller) |
||
| 63 | { |
||
| 64 | $plugins = Plugin::loaded(); |
||
| 65 | foreach ($plugins as $plugin) { |
||
|
|
|||
| 66 | $path = Plugin::path($plugin); |
||
| 67 | $navConf = $path . 'config/admin_menu.php'; |
||
| 68 | |||
| 69 | if (FS::isFile($navConf)) { |
||
| 70 | /** @noinspection PhpIncludeInspection */ |
||
| 71 | require_once $navConf; |
||
| 72 | } |
||
| 73 | } |
||
| 74 | } |
||
| 75 | } |
||
| 76 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.