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
Push — 1.0 ( 145725...d072b4 )
by Henrique
03:07
created

GermanBankAccount   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 32
c 0
b 0
f 0
ccs 0
cts 12
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A validate() 0 4 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
namespace Respect\Validation\Rules\Locale;
13
14
use malkusch\bav\BAV;
15
use Respect\Validation\Rules\AbstractRule;
16
17
/**
18
 * Validates a german bank account.
19
 *
20
 * This validator depends on the composer package "malkusch/bav".
21
 *
22
 * @author Markus Malkusch <[email protected]>
23
 *
24
 * @see    BAV::isValidBankAccount()
25
 */
26
class GermanBankAccount extends AbstractRule
27
{
28
    /**
29
     * @var string
30
     */
31
    public $bank;
32
33
    /**
34
     * @var BAV
35
     */
36
    public $bav;
37
38
    /**
39
     * @param BAV $bav
40
     */
41
    public function __construct($bank, BAV $bav = null)
42
    {
43
        if (null === $bav) {
44
            $bav = new BAV();
45
        }
46
        $this->bav = $bav;
47
        $this->bank = $bank;
48
    }
49
50
    /**
51
     * @return bool
52
     */
53
    public function validate($input)
54
    {
55
        return $this->bav->isValidBankAccount($this->bank, $input);
56
    }
57
}
58