| Conditions | 5 |
| Paths | 5 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 2 | public function placement(string $placement) |
|
| 23 | { |
||
| 24 | 2 | $placement = strtolower($placement); |
|
| 25 | switch ($placement) { |
||
| 26 | 2 | case self::TOP: |
|
| 27 | 2 | case self::RIGHT: |
|
| 28 | 2 | case self::BOTTOM: |
|
| 29 | 2 | case self::LEFT: |
|
| 30 | 1 | $this->placement = $placement; |
|
| 31 | 1 | break; |
|
| 32 | default: |
||
| 33 | 1 | $this->placement = self::BOTTOM; |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | return $this; |
|
| 37 | } |
||
| 38 | |||
| 81 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.