Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
26 | 53 | public static function nameType($model) |
|
27 | { |
||
28 | 53 | $enforcedType = ManganelMeta::create($model)->type()->type; |
|
29 | 53 | if (!empty($enforcedType)) |
|
30 | { |
||
31 | 1 | $model = new $enforcedType; |
|
32 | } |
||
33 | 53 | $collectionName = parent::nameCollection($model); |
|
|
|||
34 | 53 | return str_replace('.', '_', $collectionName); |
|
35 | } |
||
36 | |||
38 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.