Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
requestApiTrait
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 failedValidation
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Traits;
4
5use App\Models\Setting;
6use DateTime;
7use DateTimeZone;
8use Illuminate\Contracts\Validation\Validator;
9use Illuminate\Http\Exceptions\HttpResponseException;
10
11trait requestApiTrait
12{
13    use response;
14
15
16    public function failedValidation(Validator $validator)
17    {
18        throw new HttpResponseException($this->failed($validator->errors()->first(), 403, 'E03'));
19    }
20}