| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function validators() : array |
||
| 22 | { |
||
| 23 | return [ |
||
| 24 | 'name' => Validator::stringType()->notEmpty()->setName('name'), |
||
| 25 | 'isDone' => Validator::boolType()->setName('isDone'), |
||
| 26 | 'priority' => Validator::intType()->between(1, 999)->setName('priority'), |
||
| 27 | 'cardId' => Validator::intType()->notEmpty()->callback(function ($v) { |
||
| 28 | return Card::query()->find($v) instanceof Card; |
||
| 29 | })->setName('cardId') |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 50 |