| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function render( |
||
| 19 | ImageManager $imageManager, |
||
| 20 | FieldParserInterface $parser, |
||
| 21 | callable $fontResolver = null, |
||
| 22 | callable $graphicResolver = null |
||
| 23 | ) { |
||
| 24 | $image = $imageManager->canvas($parser->getWidth(), $parser->getHeight()); |
||
| 25 | |||
| 26 | $rectangleConf = function ($rectangle) use ($parser) { |
||
| 27 | $rectangle->border($parser->getLineWeight(), '#000'); |
||
| 28 | }; |
||
| 29 | $image->rectangle( |
||
| 30 | 0, |
||
| 31 | 0, |
||
| 32 | $parser->getWidth() - $parser->getLineWeight(), |
||
| 33 | $parser->getHeight() - $parser->getLineWeight(), |
||
| 34 | $rectangleConf |
||
| 35 | ); |
||
| 36 | |||
| 37 | return $image; |
||
| 38 | } |
||
| 39 | |||
| 48 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.