Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
66 | protected function runCliFile() |
||
67 | { |
||
68 | if (PHP_SAPI !== 'cli') { |
||
69 | return; |
||
70 | } |
||
71 | |||
72 | \BFW\Application::getInstance() |
||
|
|||
73 | ->getSubjectList() |
||
74 | ->getSubjectByName('ApplicationTasks') |
||
75 | ->sendNotify('run_cli_file'); |
||
76 | |||
77 | $fileToExec = $this->cli->obtainFileFromArg(); |
||
78 | $this->cli->run($fileToExec); |
||
79 | } |
||
80 | } |
||
81 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: