| Total Complexity | 12 |
| Total Lines | 72 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | abstract class LaravelValidator implements ValidatorInterface |
||
| 14 | { |
||
| 15 | |||
| 16 | protected $validator; |
||
| 17 | protected $errors = array(); |
||
| 18 | protected $data = array(); |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param Factory $validator |
||
| 23 | */ |
||
| 24 | public function __construct( Factory $validator ) |
||
| 25 | { |
||
| 26 | $this->validator = $validator; |
||
| 27 | } |
||
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * @param array $data |
||
| 32 | * @return $this |
||
| 33 | */ |
||
| 34 | public function with( array $data ) |
||
| 35 | { |
||
| 36 | $this->data = $data; |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | |||
| 41 | /** |
||
| 42 | * @param array $setOfRules |
||
| 43 | * @return bool |
||
| 44 | * @throws ValidationFunctionDoesNotExist |
||
| 45 | */ |
||
| 46 | public function passes( $setOfRules ) |
||
| 66 | } |
||
| 67 | |||
| 68 | |||
| 69 | /** |
||
| 70 | * @return mixed |
||
| 71 | */ |
||
| 72 | public function errors() |
||
| 75 | } |
||
| 76 | |||
| 77 | |||
| 78 | /** |
||
| 79 | * @param $key |
||
| 80 | * @return mixed |
||
| 81 | */ |
||
| 82 | public function get( $key ) |
||
| 85 | } |
||
| 86 | |||
| 88 | } |