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

IsNotEmpty::match()   A

Complexity

Conditions 4
Paths 2

Size

Total Lines 9
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 9
rs 9.2
cc 4
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 IsNotEmpty implements PatternExpander
9
{
10
    private $error;
11
12
    /**
13
     * @param $value
14
     * @return boolean
15
     */
16
    public function match($value)
17
    {
18
        if (false === $value || (empty($value) && '0' != $value)) {
19
            $this->error = sprintf("Value %s is not blank.", new StringConverter($value));
20
            return false;
21
        }
22
23
        return true;
24
    }
25
26
    /**
27
     * @return string|null
28
     */
29
    public function getError()
30
    {
31
        return $this->error;
32
    }
33
}
34