AssignTeamMember   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 7 1
1
<?php
2
3
namespace App\Http\Requests\Team;
4
5
use App\Http\Requests\Request;
6
use Illuminate\Support\Facades\Auth;
7
8
/**
9
 * Class AssignTeamMember
10
 * @package App\Http\Requests\Team
11
 */
12
class AssignTeamMember extends Request
13
{
14
    /**
15
     * Determine if the user is authorized to make this request.
16
     *
17
     * @return bool
18
     */
19
    public function authorize()
20
    {
21
        return Auth::check();
22
    }
23
24
    /**
25
     * Get the validation rules that apply to the request.
26
     *
27
     * @return array
28
     */
29
    public function rules()
30
    {
31
        return [
32
            'teamMember.teamId' => 'required|integer|exists:tournament_teams,id',
33
            'teamMember.memberId' => 'required|integer|exists:members,id'
34
        ];
35
    }
36
}
37