1 | <?php declare(strict_types=1); |
||
17 | class Application |
||
18 | { |
||
19 | /** @var Container $container */ |
||
20 | private $container; |
||
21 | |||
22 | /** @var string $configFolder */ |
||
23 | private $configFolder = 'config'; |
||
24 | |||
25 | /** @var string $environment */ |
||
26 | private $environment = 'production'; |
||
27 | |||
28 | /** |
||
29 | * There be nay feckin wi' constructors on board this ship |
||
30 | * There be nay copyin' o' th'ship either |
||
31 | * This ship is a singleton! |
||
32 | */ |
||
33 | private function __construct(){} |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Ahoy! There nay be boardin without yer configuration |
||
39 | * |
||
40 | * @param array $config |
||
|
|||
41 | * @return Application |
||
42 | */ |
||
43 | 10 | public static function ahoy() |
|
60 | |||
61 | /** |
||
62 | * Use this to bootstrap Bone without dispatching any request |
||
63 | * i.e. for when using the framework in a CLI application |
||
64 | */ |
||
65 | 8 | public function bootstrap(): Container |
|
77 | |||
78 | |||
79 | /** |
||
80 | * |
||
81 | * T' the high seas! Garrr! |
||
82 | * |
||
83 | * @return bool |
||
84 | * @throws \Exception |
||
85 | */ |
||
86 | 8 | public function setSail() |
|
99 | |||
100 | /** |
||
101 | * @return Container |
||
102 | */ |
||
103 | 1 | public function getContainer(): Container |
|
107 | |||
108 | /** |
||
109 | * @param string $configFolder |
||
110 | */ |
||
111 | 8 | public function setConfigFolder(string $configFolder) |
|
115 | |||
116 | /** |
||
117 | * @param string $environment |
||
118 | */ |
||
119 | 1 | public function setEnvironment(string $environment) |
|
123 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.