| 1 | <?php |
||
| 9 | class ImageTransformer extends TransformerAbstract |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * List of resources possible to include |
||
| 14 | * |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $availableIncludes = [ |
||
| 18 | 'file', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $url |
||
|
|
|||
| 24 | * @param ImageContract $image |
||
| 25 | * |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | public function transform(ImageContract $image) |
||
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * @param ImageContract $image |
||
| 38 | * |
||
| 39 | * @return \League\Fractal\Resource\Item |
||
| 40 | */ |
||
| 41 | public function includeFile(ImageContract $image) |
||
| 45 | } |
||
| 46 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.