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 (#694)
by
unknown
03:32
created

AbstractWrapper::check()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Respect\Validation\Rules;
3
4
use Respect\Validation\Validatable;
5
use Respect\Validation\Exceptions\ComponentException;
6
7
abstract class AbstractWrapper extends AbstractRule
8
{
9
    protected $validatable;
10
11 6
    public function getValidatable()
12
    {
13 6
        if (!$this->validatable instanceof Validatable) {
14 1
            throw new ComponentException('There is no defined validatable');
15
        }
16
17 5
        return $this->validatable;
18
    }
19
20 1
    public function assert($input)
21
    {
22 1
        return $this->getValidatable()->assert($input);
23
    }
24
25 1
    public function check($input)
26
    {
27 1
        return $this->getValidatable()->check($input);
28
    }
29
30 1
    public function validate($input)
31
    {
32 1
        return $this->getValidatable()->validate($input);
33
    }
34
35 1
    public function setName($name)
36
    {
37 1
        $this->getValidatable()->setName($name);
38 1
        return parent::setName($name);
39
    }
40
}
41