1 | <?php |
||
34 | class Application |
||
35 | { |
||
36 | /** @var Container $registry */ |
||
37 | private $treasureChest; |
||
38 | |||
39 | /** @var string $configFolder */ |
||
40 | private $configFolder = 'config'; |
||
41 | |||
42 | /** @var string $environment */ |
||
43 | private $environment = 'production'; |
||
44 | |||
45 | /** |
||
46 | * There be nay feckin wi' constructors on board this ship |
||
47 | * There be nay copyin' o' th'ship either |
||
48 | * This ship is a singleton! |
||
49 | */ |
||
50 | private function __construct(){} |
||
51 | |||
52 | private function __clone(){} |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Ahoy! There nay be boardin without yer configuration |
||
57 | * |
||
58 | * @param array $config |
||
|
|||
59 | * @return Application |
||
60 | */ |
||
61 | 10 | public static function ahoy() |
|
77 | |||
78 | /** |
||
79 | * Use this to bootstrap Bone without dispatching any request |
||
80 | * i.e. for when using the framework in a CLI application |
||
81 | */ |
||
82 | 8 | public function bootstrap(): Container |
|
96 | |||
97 | |||
98 | /** |
||
99 | * |
||
100 | * T' the high seas! Garrr! |
||
101 | * |
||
102 | * @return bool |
||
103 | * @throws \Exception |
||
104 | */ |
||
105 | 8 | public function setSail() |
|
134 | |||
135 | /** |
||
136 | * @return bool |
||
137 | */ |
||
138 | 8 | public function isMultilingual(): bool |
|
143 | |||
144 | |||
145 | /** |
||
146 | * @param ServerRequestInterface $request |
||
147 | * @param bool $handle |
||
148 | * @return ServerRequestInterface |
||
149 | * @throws NotFoundException |
||
150 | */ |
||
151 | 8 | private function i18nRequestCheck(ServerRequestInterface $request, bool $handle = true): ServerRequestInterface |
|
164 | |||
165 | /** |
||
166 | * @return Container |
||
167 | */ |
||
168 | 1 | public function getContainer(): Container |
|
172 | |||
173 | /** |
||
174 | * @param string $configFolder |
||
175 | */ |
||
176 | 8 | public function setConfigFolder(string $configFolder) |
|
180 | |||
181 | /** |
||
182 | * @param string $environment |
||
183 | */ |
||
184 | 1 | public function setEnvironment(string $environment) |
|
188 | } |
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.