1 | <?php |
||
15 | class ValidationService implements Contract |
||
16 | { |
||
17 | use HandlesRedirects, InteractsWithValidationData, SanitizesInput, PreparesCustomRulesForServiceValidator; |
||
18 | |||
19 | /** |
||
20 | * The container instance. |
||
21 | * |
||
22 | * @var \Illuminate\Contracts\Container\Container |
||
23 | */ |
||
24 | protected $container; |
||
25 | |||
26 | /** |
||
27 | * The key to be used for the view error bag. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $errorBag = 'default'; |
||
32 | |||
33 | /** |
||
34 | * The data to be validated. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $data; |
||
39 | |||
40 | /** |
||
41 | * Validate the class instance. |
||
42 | * |
||
43 | * @param array $data |
||
44 | * |
||
45 | * @throws \Illuminate\Validation\ValidationException |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | public function validate(array $data) |
||
64 | |||
65 | /** |
||
66 | * Get the validator for the request. |
||
67 | * |
||
68 | * @return \Illuminate\Contracts\Validation\Validator |
||
69 | */ |
||
70 | protected function getValidator() |
||
81 | |||
82 | /** |
||
83 | * Handle a failed validation attempt. |
||
84 | * |
||
85 | * @param \Illuminate\Contracts\Validation\Validator $validator |
||
86 | * |
||
87 | * @throws \Illuminate\Validation\ValidationException |
||
88 | */ |
||
89 | protected function failedValidation(Validator $validator) |
||
95 | |||
96 | /** |
||
97 | * Create the default validator instance. |
||
98 | * |
||
99 | * @param \Illuminate\Contracts\Validation\Factory $factory |
||
100 | * |
||
101 | * @return \Illuminate\Contracts\Validation\Validator |
||
102 | */ |
||
103 | public function validator(ValidationFactory $factory) |
||
112 | |||
113 | /** |
||
114 | * Run any needed logic prior to validation. |
||
115 | */ |
||
116 | protected function prepareForValidation() |
||
124 | |||
125 | /** |
||
126 | * Run any logic needed prior to validation running. |
||
127 | */ |
||
128 | protected function beforeValidation() |
||
131 | |||
132 | /** |
||
133 | * Get data to be validated from the request. |
||
134 | * |
||
135 | * @return array |
||
136 | */ |
||
137 | protected function validationData() |
||
141 | |||
142 | /** |
||
143 | * Transform the data if necessary. |
||
144 | * |
||
145 | * @param array $data |
||
146 | * |
||
147 | * @return array |
||
148 | */ |
||
149 | protected function transform($data) |
||
153 | |||
154 | /** |
||
155 | * Set the container implementation. |
||
156 | * |
||
157 | * @param \Illuminate\Contracts\Container\Container $container |
||
158 | * |
||
159 | * @return $this |
||
160 | */ |
||
161 | public function setContainer(Container $container) |
||
167 | |||
168 | /** |
||
169 | * Get custom messages for validator errors. |
||
170 | * |
||
171 | * @return array |
||
172 | */ |
||
173 | public function messages() |
||
177 | |||
178 | /** |
||
179 | * Get custom attributes for validator errors. |
||
180 | * |
||
181 | * @return array |
||
182 | */ |
||
183 | public function attributes() |
||
187 | } |
||
188 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.