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.

Code Duplication    Length = 25-25 lines in 3 locations

src/Matcher/BooleanMatcher.php 1 location

@@ 7-31 (lines=25) @@
4
5
use Coduo\ToString\StringConverter;
6
7
final class BooleanMatcher extends Matcher
8
{
9
    const BOOLEAN_PATTERN = '/^@boolean@$/';
10
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function match($value, $pattern)
15
    {
16
        if (!is_bool($value)) {
17
            $this->error = sprintf("%s \"%s\" is not a valid boolean.", gettype($value), new StringConverter($value));
18
            return false;
19
        }
20
21
        return true;
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function canMatch($pattern)
28
    {
29
        return is_string($pattern) && 0 !== preg_match(self::BOOLEAN_PATTERN, $pattern);
30
    }
31
}
32

src/Matcher/NumberMatcher.php 1 location

@@ 7-31 (lines=25) @@
4
5
use Coduo\ToString\StringConverter;
6
7
final class NumberMatcher extends Matcher
8
{
9
    const NUMBER_PATTERN = '/^@number@$/';
10
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function match($value, $pattern)
15
    {
16
        if (!is_numeric($value)) {
17
            $this->error = sprintf("%s \"%s\" is not a valid number.", gettype($value), new StringConverter($value));
18
            return false;
19
        }
20
21
        return true;
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function canMatch($pattern)
28
    {
29
        return is_string($pattern) && 0 !== preg_match(self::NUMBER_PATTERN, $pattern);
30
    }
31
}
32

src/Matcher/NullMatcher.php 1 location

@@ 7-31 (lines=25) @@
4
5
use Coduo\ToString\StringConverter;
6
7
final class NullMatcher extends Matcher
8
{
9
    const MATCH_PATTERN = "/^@null@$/";
10
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function match($value, $pattern)
15
    {
16
        if (null !== $value) {
17
            $this->error = sprintf("%s \"%s\" does not match null.", gettype($value), new StringConverter($value));
18
            return false;
19
        }
20
21
        return true;
22
    }
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    public function canMatch($pattern)
28
    {
29
        return is_null($pattern) || (is_string($pattern) && 0 !== preg_match(self::MATCH_PATTERN, $pattern));
30
    }
31
}
32