| Total Complexity | 11 |
| Total Lines | 91 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 8 | class HelperServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | protected $HELPERS_PATH = 'Helpers/'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Register services. |
||
| 14 | * |
||
| 15 | * @return void |
||
| 16 | */ |
||
| 17 | public function register() |
||
| 18 | { |
||
| 19 | $this->registerHelpers(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Register helpers. |
||
| 24 | * |
||
| 25 | * @return void |
||
| 26 | */ |
||
| 27 | public function registerHelpers() |
||
| 28 | { |
||
| 29 | $helpers = glob($this->packagePath('/Helpers/*.php')); |
||
| 30 | foreach ($helpers as $helper) { |
||
| 31 | if (file_exists($helper)) { |
||
| 32 | require_once $helper; |
||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param $path |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | private function packagePath($path) |
||
| 43 | { |
||
| 44 | return __DIR__."/$path"; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Bootstrap services. |
||
| 49 | * |
||
| 50 | * @return void |
||
| 51 | */ |
||
| 52 | public function boot() |
||
| 53 | { |
||
| 54 | // load command files |
||
| 55 | $this->registerCommands(); |
||
| 56 | |||
| 57 | // load publisher files |
||
| 58 | $this->registerResources(); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Register commands. |
||
| 63 | * |
||
| 64 | * @return void |
||
| 65 | */ |
||
| 66 | private function registerCommands() |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Register resources. |
||
| 74 | * |
||
| 75 | * @return void |
||
| 76 | */ |
||
| 77 | public function registerResources() |
||
| 87 | ); |
||
| 88 | } |
||
| 89 | } |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Check if package is running under Lumen app. |
||
| 93 | * |
||
| 94 | * @return bool |
||
| 95 | */ |
||
| 96 | protected function isLumen() |
||
| 99 | } |
||
| 100 | } |
||
| 101 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.