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

GermanBic   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 BIC (Bank Identifier Code).
9
 *
10
 * This validator depends on the composer package "malkusch/bav".
11
 *
12
 * Note: It is not recommended to use this validator with BAV's default
13
 * configuration. Use a configuration with one of the following
14
 * DataBackendContainer implementations:
15
 * PDODataBackendContainer or DoctrineBackendContainer.
16
 *
17
 * @author Markus Malkusch <[email protected]>
18
 * @see    BAV::isValidBIC()
19
 * @see    \malkusch\bav\Configuration
20
 * @see    \malkusch\bav\ConfigurationRegistry::setConfiguration()
21
 */
22
class GermanBic extends AbstractRule
23
{
24
    /**
25
     * @var BAV
26
     */
27
    public $bav;
28
29
    /**
30
     * @param BAV $bav
31
     */
32 5
    public function __construct(BAV $bav = null)
33
    {
34 5
        if (null === $bav) {
35 1
            $bav = new BAV();
36 1
        }
37 5
        $this->bav = $bav;
38 5
    }
39
40
    /**
41
     * @return boolean
42
     */
43 3
    public function validate($input)
44
    {
45 3
        return $this->bav->isValidBIC($input);
46
    }
47
}
48