GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Validator::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Burthorpe\Runescape\Integrations\Laravel;
4
5
use Burthorpe\Runescape\RS3\API;
6
7
class Validator
8
{
9
    /**
10
     * API Instance
11
     *
12
     * @var \Burthorpe\Runescape\RS3\API
13
     */
14
    protected $api;
15
16
    /**
17
     * Class constructor
18
     */
19
    public function __construct()
20
    {
21
        $this->api = new API();
22
    }
23
24
    /**
25
     * Checks if the given string is a valid runescape display name
26
     *
27
     * @param  n    $attribute
28
     * @param  n    $value
29
     * @param  n    $params
30
     * @param  n    $validator
31
     * @return bool
32
     */
33
    public function validateDisplayName($attribute, $value, $params, $validator)
34
    {
35
        return $this->api->validateDisplayName($value);
36
    }
37
}
38