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.

Issues (5)

src/Postcode.php (1 issue)

1
<?php
2
3
namespace SeedsStd\JpValidationRules;
4
5
use Illuminate\Contracts\Validation\Rule;
6
7
class Postcode implements Rule
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $configs;
13
14
    /**
15
     * Create a new rule instance.
16
     *
17
     * @param array $configs
18
     * @return void
19
     */
20
    public function __construct(array $configs = [])
21
    {
22
        $default_configs = [];
23
24
        $this->configs = array_merge($default_configs, $configs);
25
    }
26
27
    /**
28
     * Determine if the validation rule passes.
29
     *
30
     * @param  string $attribute
31
     * @param  mixed $value
32
     * @return bool
33
     */
34
    public function passes($attribute, $value)
35
    {
36
        return (bool)preg_match('/^\d{3}\-?\d{4}$/', $value);
37
    }
38
39
    /**
40
     * Get the validation error message.
41
     *
42
     * @return string
43
     */
44
    public function message()
45
    {
46
        return __('validation.jp_postcode');
0 ignored issues
show
Bug Best Practice introduced by
The expression return __('validation.jp_postcode') also could return the type array which is incompatible with the documented return type string.
Loading history...
47
    }
48
}
49