DedicatedServerRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
eloc 14
dl 0
loc 27
ccs 0
cts 3
cp 0
rs 10
c 1
b 1
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 3 1
A rules() 0 14 1
1
<?php
2
3
namespace Gameap\Http\Requests\GdaemonAPI;
4
5
use Gameap\Http\Requests\Request;
6
7
class DedicatedServerRequest extends Request
8
{
9
    public function rules()
10
    {
11
        return [
12
            'name'                  => 'required|max:128',
13
            'location'              => 'required|max:128',
14
            'ip'                    => 'required',
15
            'work_path'             => 'required|max:128',
16
            'gdaemon_host'          => 'required|max:128',
17
            'gdaemon_port'          => 'required|numeric|digits_between:1,65535',
18
            'gdaemon_login'         => 'max:128',
19
            'gdaemon_password'      => 'max:128',
20
            'gdaemon_api_key'       => '',
21
            'gdaemon_server_cert'   => 'sometimes',
22
            'client_certificate_id' => 'numeric|exists:client_certificates,id',
23
        ];
24
    }
25
26
    /**
27
     * Authorization
28
     *
29
     * @return boolean
30
     */
31
    public function authorize()
32
    {
33
        return true;
34
    }
35
}
36