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 (#957)
by Henrique
02:16
created

AbstractWrapper::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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
declare(strict_types=1);
13
14
namespace Respect\Validation\Rules;
15
16
use Respect\Validation\Validatable;
17
18
/**
19
 * Abstract class to help on creating rules that wrap rules.
20
 *
21
 * @author Henrique Moody <[email protected]>
22
 */
23
abstract class AbstractWrapper extends AbstractRule
24
{
25
    /**
26
     * @var Validatable
27
     */
28
    private $validatable;
29
30
    /**
31
     * Initializes the rule.
32
     *
33
     * @param Validatable $validatable
34
     */
35 5
    public function __construct(Validatable $validatable)
36
    {
37 5
        $this->validatable = $validatable;
38 5
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43 1
    public function assert($input): void
44
    {
45 1
        $this->validatable->assert($input);
46 1
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51 1
    public function check($input): void
52
    {
53 1
        $this->validatable->check($input);
54 1
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59 1
    public function validate($input): bool
60
    {
61 1
        return $this->validatable->validate($input);
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67 1
    public function setId($name)
68
    {
69 1
        $this->validatable->setId($name);
70
71 1
        return parent::setId($name);
72
    }
73
}
74