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.
Passed
Push — master ( 7e274b...f22b59 )
by Marco
01:36
created

IsNotNull::validate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Marcosh\PhpValidationDSL\Basic;
6
7
use Marcosh\PhpValidationDSL\Result\ValidationResult;
8
use Marcosh\PhpValidationDSL\Validation;
9
10
final class IsNotNull extends ComposingAssertion implements Validation
11
{
12
    public const MESSAGE = 'is-not-null.not-not-null';
13
14
    public function validate($data, array $context = []): ValidationResult
15
    {
16
        return parent::validateAssertion(
17
            function ($data) {
18
                return null !== $data;
19
            },
20
            $data,
21
            $context
22
        );
23
    }
24
}
25