1 | <?php |
||
30 | class RequestBuilder |
||
31 | { |
||
32 | /** |
||
33 | * @var \Psr\Cache\CacheItemPoolInterface |
||
34 | */ |
||
35 | private $cache; |
||
36 | /** |
||
37 | * @var ParserGenerator |
||
38 | */ |
||
39 | private $parserGenerator; |
||
40 | |||
41 | /** |
||
42 | * Class constructor. |
||
43 | * |
||
44 | * @param \stdClass $cacheConfig |
||
|
|||
45 | * Config parameters for cache. By default cache is activated and saves files |
||
46 | * under system's temp dir. This parameter is used to set alternative options. |
||
47 | * |
||
48 | */ |
||
49 | public function __construct( |
||
56 | |||
57 | /** |
||
58 | * Main method of this class. Used to convert a request to an object of a given class by |
||
59 | * using a requestParser. |
||
60 | * |
||
61 | * @param array|\stdClass $request The request to convert to an object. |
||
62 | * @param string $className The class of the object to which the request must be converted. |
||
63 | * @param string $behaviour The behaviour of the parser. |
||
64 | */ |
||
65 | public function parseRequest( |
||
73 | |||
74 | private function generateRequestParserObject($className, $parser) |
||
87 | |||
88 | private function sanitizeRequestOrThrowExceptionIfInvalid($request) |
||
98 | } |
||
99 |
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.