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

GermanBank::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
crap 2
1
<?php
2
namespace Respect\Validation\Rules\Locale;
3
4
use malkusch\bav\BAV;
5
use Respect\Validation\Rules\AbstractRule;
6
7
/**
8
 * Validates a german bank.
9
 *
10
 * This validator depends on the composer package "malkusch/bav".
11
 *
12
 * @author Markus Malkusch <[email protected]>
13
 * @see    BAV::isValidBank()
14
 */
15
class GermanBank extends AbstractRule
16
{
17
    /**
18
     * @var BAV
19
     */
20
    public $bav;
21
22
    /**
23
     * @param BAV $bav
24
     */
25 5
    public function __construct(BAV $bav = null)
26
    {
27 5
        if (null === $bav) {
28 1
            $bav = new BAV();
29 1
        }
30 5
        $this->bav = $bav;
31 5
    }
32
33
    /**
34
     * @return boolean
35
     */
36 3
    public function validate($input)
37
    {
38 3
        return $this->bav->isValidBank($input);
39
    }
40
}
41