Passed
Push — master ( 4d1241...80f59e )
by Craig
03:09
created

Maori   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 23
c 0
b 0
f 0
dl 0
loc 33
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 22 1
A getRandomChar() 0 3 1
1
<?php
2
3
namespace CustomD\WordFinder\CharacterMaps;
4
5
use Illuminate\Support\Collection;
6
use CustomD\WordFinder\CharacterMap;
7
8
class Maori implements CharacterMap
9
{
10
11
    protected Collection $chars;
12
13
    public function __construct()
14
    {
15
        $this->chars = collect([
16
            65,
17
            196,
18
            69,
19
            203,
20
            71,
21
            72,
22
            73,
23
            207,
24
            75,
25
            77,
26
            78,
27
            79,
28
            214,
29
            80,
30
            82,
31
            84,
32
            85,
33
            220,
34
            87,
35
        ]);
36
    }
37
38
    public function getRandomChar()
39
    {
40
        return chr($this->chars->random());
41
    }
42
}
43