Completed
Push — api/develop ( 101612...945750 )
by Bertrand
07:26
created

Request::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of the HRis Software package.
5
 *
6
 * HRis - Human Resource and Payroll System
7
 *
8
 * @link    http://github.com/HB-Co/HRis
9
 */
10
namespace HRis\Api\Requests\Auth;
11
12
use HRis\Http\Requests\Request as BaseRequest;
13
14
class Request extends BaseRequest
15
{
16
    /**
17
     * Get the validation rules that apply to the request.
18
     *
19
     * @return array
20
     *
21
     * @author Bertrand Kintanar <[email protected]>
22
     */
23 164
    public function rules()
24
    {
25
        return [
26 164
            'email'    => 'required|exists:users,email',
27
            'password' => 'required'
28 164
        ];
29
    }
30
31
    /**
32
     * Determine if the user is authorized to make this request.
33
     *
34
     * @return bool
35
     *
36
     * @author Bertrand Kintanar <[email protected]>
37
     */
38 164
    public function authorize()
39
    {
40 164
        return true;
41
    }
42
}
43