SmallAlphanumeric   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 11
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 8 8 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace DeGraciaMathieu\Riddler\Formats;
4
5
use DeGraciaMathieu\Riddler\Occurrences;
6
use DeGraciaMathieu\Riddler\Dictionaries;
7
use DeGraciaMathieu\Riddler\Contracts\Format;
8
9 View Code Duplication
class SmallAlphanumeric implements Format
10
{
11 1
    public function handle()
12
    {
13
        return [
14 1
            [new Dictionaries\Digit(), new Occurrences\Strict(5)],
15 1
            [new Dictionaries\Letter(), new Occurrences\Strict(5)],
16 1
            [new Dictionaries\UppercaseLetter(), new Occurrences\Strict(5)]
17 1
        ];
18
    }
19
}
20