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.
Completed
Push — master ( 0fb90f...9dcc7c )
by Scott
10s
created

Timezone::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of https://github.com/laravel-validation-rules/timezone
5
 *
6
 *  (c) Scott Wilcox <[email protected]>
7
 *
8
 *  For the full copyright and license information, please view the LICENSE
9
 *  file that was distributed with this source code.
10
 *
11
 */
12
13
namespace LVR\Timezone;
14
15
use DateTimeZone;
16
use Illuminate\Contracts\Validation\Rule;
17
18
class Timezone implements Rule
19
{
20
    /**
21
     * Create a new rule instance.
22
     *
23
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
24
     */
25
    public function __construct()
26
    {
27
        //
28
    }
29
30
    /**
31
     * Determine if the validation rule passes.
32
     *
33
     * @param  string $attribute
34
     * @param  mixed  $value
35
     * @return bool
36
     */
37
    public function passes($attribute, $value)
38
    {
39
        return in_array($value, DateTimeZone::listIdentifiers());
40
    }
41
42
    /**
43
     * Get the validation error message.
44
     *
45
     * @return string
46
     */
47
    public function message()
48
    {
49
        return 'The timezone does not exist.';
50
    }
51
}
52