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 ( ae724f...a11daa )
by Norbert
02:52 queued 01:17
created

IsEmpty::getError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Coduo\PHPMatcher\Matcher\Pattern\Expander;
4
5
use Coduo\PHPMatcher\Matcher\Pattern\PatternExpander;
6
use Coduo\ToString\StringConverter;
7
8
final class IsEmpty implements PatternExpander
9
{
10
    private $error;
11
12
    /**
13
     * @param mixed $value
14
     *
15
     * @return boolean
16
     */
17
    public function match($value)
18
    {
19
        if (!empty($value)) {
20
            $this->error = sprintf("Value %s is not empty.", new StringConverter($value));
21
22
            return false;
23
        }
24
25
        return true;
26
    }
27
28
    /**
29
     * @return string|null
30
     */
31
    public function getError()
32
    {
33
        return $this->error;
34
    }
35
}
36