CreateRoleRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace Finder\Http\Requests\User;
4
5
class CreateRoleRequest extends Request
6
{
7
    /**
8
     * Class constructor.
9
     *
10
     * @param  array
11
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
12
     */
13
    public function __construct(array $rules = [])
14
    {
15
        parent::__construct(
16
            [
17
            'name' => [_('Name'), 'required|max:255|unique:roles,name{excludeCurrentId}'],
18
            'is_default' => [_('Default'), 'required|integer|min:0|max:1'],
19
            ]
20
        );
21
    }
22
}
23