| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function __construct(string $name, string $code) |
||
| 38 | { |
||
| 39 | // todo movie to db constraint |
||
| 40 | if (mb_strlen($code) !== 3) { |
||
| 41 | // throw new \InvalidArgumentException(sprintf('"%s" should be exactly 3 characters long', $code)); |
||
| 42 | } |
||
| 43 | |||
| 44 | $this->code = mb_strtoupper($code); |
||
| 45 | $this->name = ucfirst($name); |
||
| 46 | } |
||
| 47 | |||
| 63 |