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

GermanBic   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
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 26
c 0
b 0
f 0
ccs 0
cts 11
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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 BIC (Bank Identifier Code).
19
 *
20
 * This validator depends on the composer package "malkusch/bav".
21
 *
22
 * Note: It is not recommended to use this validator with BAV's default
23
 * configuration. Use a configuration with one of the following
24
 * DataBackendContainer implementations:
25
 * PDODataBackendContainer or DoctrineBackendContainer.
26
 *
27
 * @author Markus Malkusch <[email protected]>
28
 *
29
 * @see    BAV::isValidBIC()
30
 * @see    \malkusch\bav\Configuration
31
 * @see    \malkusch\bav\ConfigurationRegistry::setConfiguration()
32
 */
33
class GermanBic extends AbstractRule
34
{
35
    /**
36
     * @var BAV
37
     */
38
    public $bav;
39
40
    /**
41
     * @param BAV $bav
42
     */
43
    public function __construct(BAV $bav = null)
44
    {
45
        if (null === $bav) {
46
            $bav = new BAV();
47
        }
48
        $this->bav = $bav;
49
    }
50
51
    /**
52
     * @return bool
53
     */
54
    public function validate($input)
55
    {
56
        return $this->bav->isValidBIC($input);
57
    }
58
}
59