| Total Complexity | 8 |
| Total Lines | 85 |
| Duplicated Lines | 0 % |
| Coverage | 12.5% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class NullValidator implements Validator |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Get the messages for the instance. |
||
| 13 | * |
||
| 14 | * @return \Illuminate\Contracts\Support\MessageBag |
||
| 15 | */ |
||
| 16 | public function getMessageBag() |
||
| 17 | { |
||
| 18 | return new MessageBag(); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Run the validator's rules against its data. |
||
| 23 | * |
||
| 24 | * @return array |
||
| 25 | */ |
||
| 26 | 80 | public function validate() |
|
| 27 | { |
||
| 28 | 80 | return []; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Get the attributes and values that were validated. |
||
| 33 | * |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function validated() |
||
| 37 | { |
||
| 38 | return []; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Determine if the data fails the validation rules. |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | public function fails() |
||
| 47 | { |
||
| 48 | return false; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get the failed validation rules. |
||
| 53 | * |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public function failed() |
||
| 57 | { |
||
| 58 | return []; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Add conditions to a given field based on a Closure. |
||
| 63 | * |
||
| 64 | * @param string|array $attribute |
||
| 65 | * @param string|array $rules |
||
| 66 | * @param callable $callback |
||
| 67 | * @return $this |
||
| 68 | */ |
||
| 69 | public function sometimes($attribute, $rules, callable $callback) |
||
| 70 | { |
||
| 71 | return $this; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Add an after validation callback. |
||
| 76 | * |
||
| 77 | * @param callable|string $callback |
||
| 78 | * @return $this |
||
| 79 | */ |
||
| 80 | public function after($callback) |
||
| 81 | { |
||
| 82 | return $this; |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Get all of the validation error messages. |
||
| 87 | * |
||
| 88 | * @return \Illuminate\Support\MessageBag |
||
| 89 | */ |
||
| 90 | public function errors() |
||
| 93 | } |
||
| 94 | } |
||
| 95 |