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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validate() 0 4 1
A __construct() 0 7 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