Request::authorize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the HRis Software package.
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * Licensed under the 3-clause BSD License.
9
 *
10
 * This source file is subject to the 3-clause BSD License that is
11
 * bundled with this package in the LICENSE file.
12
 *
13
 * @version    alpha
14
 *
15
 * @author     Bertrand Kintanar <[email protected]>
16
 * @license    BSD License (3-clause)
17
 * @copyright  (c) 2014-2016, b8 Studios, Ltd
18
 *
19
 * @link       http://github.com/HB-Co/HRis
20
 */
21
22
namespace HRis\Api\Requests\Auth;
23
24
use Irradiate\Api\Requests\Request as BaseRequest;
25
26
class Request extends BaseRequest
27
{
28
    /**
29
     * Get the validation rules that apply to the request.
30
     *
31
     * @return array
32
     *
33
     * @author Bertrand Kintanar <[email protected]>
34
     */
35 196
    public function rules()
36
    {
37
        return [
38 196
            'email'    => 'required|exists:users,email',
39 196
            'password' => 'required',
40 196
        ];
41
    }
42
43
    /**
44
     * Determine if the user is authorized to make this request.
45
     *
46
     * @return bool
47
     *
48
     * @author Bertrand Kintanar <[email protected]>
49
     */
50 196
    public function authorize()
51
    {
52 196
        return true;
53
    }
54
}
55