Passed
Push — master ( b8c666...25f75c )
by Nikita
20:49 queued 09:26
created

ServerRequest::lastProcessCheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gameap\Http\Requests\GdaemonAPI;
4
5
class ServerRequest extends JsonRequest
6
{
7
    public function rules()
8
    {
9
        return [
10
            'installed'          => 'nullable|numeric|digits_between:0,9',
11
            'process_active'     => 'nullable|numeric|digits_between:0,1',
12
            'last_process_check' => '',
13
        ];
14
    }
15
16
    public function installed(): ?int
17
    {
18
        return $this->get('installed');
19
    }
20
21
    public function processActive(): ?int
22
    {
23
        return $this->get('process_active');
24
    }
25
26
    public function lastProcessCheck(): ?string
27
    {
28
        return $this->get('last_process_check');
29
    }
30
}
31