ZxcvbnDecorator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addMatcher() 0 3 1
A __construct() 0 5 1
A passwordStrength() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Createnl\ZxcvbnBundle;
5
6
use ZxcvbnPhp\Zxcvbn;
7
8
class ZxcvbnDecorator extends Zxcvbn
9
{
10
    /**
11
     * @var Zxcvbn
12
     */
13
    private $inner;
14
15 2
    public function __construct(Zxcvbn $inner)
16
    {
17 2
        $this->inner = $inner;
18
19 2
        parent::__construct();
20 2
    }
21
22 1
    public function addMatcher(string $className)
23
    {
24 1
        return $this->inner->addMatcher($className);
25
    }
26
27 1
    public function passwordStrength($password, array $userInputs = [])
28
    {
29 1
        return $this->inner->passwordStrength($password, $userInputs);
30
    }
31
32
}
33