| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 20 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function message(): string |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | $docBlockTypes = $this->parameter->getDocBlockTypes(); |
||
| 33 | } catch (\InvalidArgumentException $e) { |
||
| 34 | // we need this here to prevent reflection-bocblock errors on @see invalid Fqsen |
||
| 35 | } |
||
| 36 | |||
| 37 | return sprintf( |
||
| 38 | 'Parameter <info>%s</info> of method <info>%s</info> of the class <info>%s</info> ' . |
||
| 39 | 'defined in <comment>%s</comment> has a <info>%s</info> type hint, ' . |
||
| 40 | 'but has a <info>%s</info> doc block type.', |
||
| 41 | $this->parameter->getName(), |
||
| 42 | $this->parameter->getDeclaringFunction()->getName(), |
||
| 43 | $this->parameter->getDeclaringFunction()->getDeclaringClass()->getName(), |
||
| 44 | $this->parameter->getDeclaringFunction()->getFileName(), |
||
| 45 | $this->parameter->getTypeHint(), |
||
| 46 | implode($docBlockTypes) |
||
| 47 | ); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |