| Conditions | 7 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php |
||
| 76 | 3 | private function checkType($type) |
|
| 77 | { |
||
| 78 | 3 | if ($type !== self::TYPE_DANGER && |
|
| 79 | 3 | $type !== self::TYPE_DEFAULT && |
|
| 80 | 3 | $type !== self::TYPE_INFO && |
|
| 81 | 3 | $type !== self::TYPE_SUCCESS && |
|
| 82 | 3 | $type !== self::TYPE_WARNING |
|
| 83 | ) { |
||
| 84 | 1 | return ($this->getType() !== null) ? $this->getType() : self::TYPE_DEFAULT; |
|
| 85 | } else { |
||
| 86 | 3 | return $type; |
|
| 87 | } |
||
| 88 | } |
||
| 89 | } |
||
| 90 |