| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function make(string $type): Mapping |
||
| 17 | { |
||
| 18 | if ($mapClass = $this->isDefaultMapping($type)) { |
||
| 19 | return new $mapClass; |
||
| 20 | } |
||
| 21 | |||
| 22 | $customMapping = $this->getCustomMapping($type); |
||
| 23 | if (!is_null($customMapping) && $customMapping instanceof Mapping) { |
||
| 24 | return $customMapping; |
||
| 25 | } |
||
| 26 | |||
| 27 | throw new InvalidAttributeType("The attribute type '{$type}' is not supported"); |
||
| 28 | } |
||
| 29 | |||
| 59 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.