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::match()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
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