Test Failed
Push — master ( c990b8...9cee3b )
by Magnar Ovedal
07:12 queued 04:33
created

LowerCaseConverter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A applyCurrent() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stadly\PasswordPolice\Formatter;
6
7
use Stadly\PasswordPolice\CharTree;
8
use Stadly\PasswordPolice\CodeMap\LowerCaseMap;
9
use Stadly\PasswordPolice\Formatter;
10
11
final class LowerCaseConverter implements Formatter
12
{
13
    use Chaining;
14
15
    /**
16
     * @var Coder Lower case coder.
0 ignored issues
show
Bug introduced by
The type Stadly\PasswordPolice\Formatter\Coder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
     */
18
    private $lowerCaseCoder;
19
20
    public function __construct()
21
    {
22
        $this->lowerCaseCoder = new Coder(new LowerCaseMap());
23
    }
24
25
    /**
26
     * @param CharTree $charTree Character tree to format.
27
     * @return CharTree Lower case converted variant of the character tree.
28
     */
29
    protected function applyCurrent(CharTree $charTree): CharTree
30
    {
31
        return $this->lowerCaseCoder->apply($charTree);
32
    }
33
}
34