Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#904)
by Jens
06:26
created

Nullable::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 7
rs 9.4285
1
<?php
2
3
/*
4
 * This file is part of Respect/Validation.
5
 *
6
 * (c) Alexandre Gomes Gaigalas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the "LICENSE.md"
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Respect\Validation\Rules;
13
14
use Respect\Validation\Validatable;
15
16
class Nullable extends AbstractWrapper
17
{
18
    public function __construct(Validatable $rule)
19
    {
20
        $this->validatable = $rule;
21
    }
22
23
    public function assert($input)
24
    {
25
        if ($input === null) {
26
            return true;
27
        }
28
29
        return parent::assert($input);
30
    }
31
32
    public function check($input)
33
    {
34
        if ($input === null) {
35
            return true;
36
        }
37
38
        return parent::check($input);
39
    }
40
41
    public function validate($input)
42
    {
43
        if ($input === null) {
44
            return true;
45
        }
46
47
        return parent::validate($input);
48
    }
49
}
50