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 — 0.9 (#692)
by
unknown
02:58
created

NoneOf   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 25
c 0
b 0
f 0
ccs 13
cts 13
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A assert() 0 11 2
A validate() 0 10 3
1
<?php
2
namespace Respect\Validation\Rules;
3
4
class NoneOf extends AbstractComposite
5
{
6 5
    public function assert($input)
7
    {
8 5
        $exceptions = $this->validateRules($input);
9 5
        $numRules = count($this->getRules());
10 5
        $numExceptions = count($exceptions);
11 5
        if ($numRules !== $numExceptions) {
12 4
            throw $this->reportError($input)->setRelated($exceptions);
13
        }
14
15 1
        return true;
16
    }
17
18 2
    public function validate($input)
19
    {
20 2
        foreach ($this->getRules() as $rule) {
21 2
            if ($rule->validate($input)) {
22 1
                return false;
23
            }
24 2
        }
25
26 1
        return true;
27
    }
28
}
29