1 | <?php |
||
2 | /** |
||
3 | * Service scanner init |
||
4 | * User: moyo |
||
5 | * Date: 2018/9/3 |
||
6 | * Time: 12:21 PM |
||
7 | */ |
||
8 | |||
9 | namespace Carno\HRPC\Components; |
||
10 | |||
11 | use Carno\Console\App; |
||
12 | use Carno\Console\Component; |
||
13 | use Carno\Console\Contracts\Application; |
||
14 | use Carno\Console\Contracts\Bootable; |
||
15 | use Carno\Container\DI; |
||
16 | use Carno\RPC\Service\Router; |
||
17 | use Carno\RPC\Service\Scanner as RScanner; |
||
18 | |||
19 | class Scanner extends Component implements Bootable |
||
20 | { |
||
21 | /** |
||
22 | * @param Application|App $app |
||
23 | */ |
||
24 | public function starting(Application $app) : void |
||
25 | { |
||
26 | /** |
||
27 | * @var Router $router |
||
28 | * @var RScanner $scanner |
||
29 | */ |
||
30 | |||
31 | if (defined('CWD') && is_file($rf = CWD . '/registers.php')) { |
||
32 | DI::set(Router::class, $router = DI::object(Router::class)); |
||
33 | DI::set(RScanner::class, $scanner = DI::object(RScanner::class)); |
||
34 | |||
35 | $scanner->sources(...(array) include $rf)->serving(); |
||
36 | |||
37 | $app->named($router->server()); |
||
0 ignored issues
–
show
|
|||
38 | |||
39 | $app->starting()->add(static function () use ($scanner) { |
||
40 | $scanner->analyzing(); |
||
41 | }); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 |
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.