| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class StoreRequest extends FormRequest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * {@inheritDoc} |
||
| 12 | */ |
||
| 13 | 1 | public function authorize() |
|
| 14 | { |
||
| 15 | 1 | return $this->user()->hasRole(Role::ROLE_ADMIN); |
|
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritDoc} |
||
| 20 | */ |
||
| 21 | 1 | public function rules() |
|
| 22 | { |
||
| 23 | return [ |
||
| 24 | 1 | 'key' => 'required|string|max:255|unique:configurations', |
|
| 25 | 'value' => 'required|string|max:255', |
||
| 26 | 'description' => 'sometimes|nullable|string', |
||
| 27 | ]; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritDoc} |
||
| 32 | */ |
||
| 33 | 1 | public function attributes() |
|
| 39 | ]; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |