| Conditions | 5 |
| Paths | 5 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 5.2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 1 | public function __construct(...$args) |
|
| 28 | { |
||
| 29 | 1 | if (empty($args[0]) || !is_string($args[0])) { |
|
| 30 | throw new \Exception('Please specify row title'); |
||
| 31 | } |
||
| 32 | |||
| 33 | 1 | $this->title = $args[0]; |
|
| 34 | |||
| 35 | 1 | $this->field = (!empty($args[1]) && is_string($args[1])) ? $args[1] : Str::snake($args[1]); |
|
| 36 | 1 | } |
|
| 63 |