CreateLeague   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;
4
5
use Illuminate\Support\Facades\Auth;
6
7
/**
8
 * Class CreateLeague
9
 * @package App\Http\Requests
10
 */
11
class CreateLeague extends Request
12
{
13
    /**
14
     * Determine if the user is authorized to make this request.
15
     *
16
     * @return bool
17
     */
18
    public function authorize()
19
    {
20
        return Auth::check();
21
    }
22
23
    /**
24
     * Get the validation rules that apply to the request.
25
     *
26
     * @return array
27
     */
28
    public function rules()
29
    {
30
        return [
31
            'league.name' => 'required|min:3|max:255',
32
            'league.logo' => 'image|mimes:jpeg,bmp,png,jpg|max:10000'
33
        ];
34
    }
35
}
36