| Conditions | 6 |
| Paths | 16 |
| Total Lines | 27 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | 11 | public function build(AbstractModel $model) { |
|
| 12 | 11 | $this->buildDocblock($model); |
|
|
1 ignored issue
–
show
|
|||
| 13 | |||
| 14 | 11 | if ($model->isFinal()) { |
|
|
1 ignored issue
–
show
|
|||
| 15 | 1 | $this->writer->write('final '); |
|
| 16 | } |
||
| 17 | |||
| 18 | 11 | if ($model->isAbstract()) { |
|
|
1 ignored issue
–
show
|
|||
| 19 | 2 | $this->writer->write('abstract '); |
|
| 20 | } |
||
| 21 | |||
| 22 | 11 | $this->writer->write($model->getVisibility() . ' '); |
|
|
1 ignored issue
–
show
|
|||
| 23 | |||
| 24 | 11 | if ($model->isStatic()) { |
|
|
1 ignored issue
–
show
|
|||
| 25 | 2 | $this->writer->write('static '); |
|
| 26 | } |
||
| 27 | |||
| 28 | 11 | $this->writeFunctionStatement($model); |
|
|
1 ignored issue
–
show
|
|||
| 29 | |||
| 30 | 11 | if ($model->isAbstract() || $model->getParent() instanceof PhpInterface) { |
|
|
2 ignored issues
–
show
|
|||
| 31 | 2 | $this->writer->writeln(';'); |
|
| 32 | |||
| 33 | 2 | return; |
|
| 34 | } |
||
| 35 | |||
| 36 | 10 | $this->writeBody($model); |
|
|
1 ignored issue
–
show
|
|||
| 37 | 10 | } |
|
| 38 | |||
| 39 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: