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
Push — 2.0 ( e6a123...4184ab )
by Henrique
03:41
created

Not::assert()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 15
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 0
cts 8
cp 0
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 9
nc 3
nop 1
crap 12

1 Method

Rating   Name   Duplication   Size   Complexity  
A Not::validate() 0 7 1
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\Result;
15
use Respect\Validation\Rule;
16
17
/**
18
 * Negates the given rule.
19
 *
20
 * @author Alexandre Gomes Gaigalas <[email protected]>
21
 * @author Henrique Moody <[email protected]>
22
 *
23
 * @since 0.3.9
24
 */
25
final class Not implements Rule
26
{
27
    /**
28
     * @var Rule
29
     */
30
    private $rule;
31
32
    /**
33
     * Initializes the rule.
34
     *
35
     * @param Rule $rule
36
     */
37 2
    public function __construct(Rule $rule)
38
    {
39 2
        $this->rule = $rule;
40 2
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 26
    public function validate($input): Result
46
    {
47 26
        $ruleResult = $this->rule->validate($input);
48 26
        $ruleResult = $ruleResult->invert();
49
50 26
        return new Result($ruleResult->isValid(), $input, $this, [], $ruleResult);
51
    }
52
}
53