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

Maori::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 20
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 22
rs 9.6
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