PaperKeyFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace KoenHoeijmakers\PaperKeyGenerator\Factories;
4
5
use KoenHoeijmakers\PaperKeyGenerator\PaperKeyGenerator;
6
use KoenHoeijmakers\PaperKeyGenerator\WordLists\EnglishWordList;
7
use KoenHoeijmakers\PaperKeyGenerator\WordLists\Interfaces\WordListInterface;
8
9
class PaperKeyFactory
10
{
11
    /**
12
     * Factorize a new PaperKey object with the given word list.
13
     *
14
     * @param \KoenHoeijmakers\PaperKeyGenerator\WordLists\Interfaces\WordListInterface $wordList
15
     * @return \KoenHoeijmakers\PaperKeyGenerator\PaperKeyGenerator
16
     */
17
    public static function create(WordListInterface $wordList)
18
    {
19
        return new PaperKeyGenerator($wordList);
20
    }
21
22
    /**
23
     * Factorize a new PaperKey object with a english word list.
24
     *
25
     * @return \KoenHoeijmakers\PaperKeyGenerator\PaperKeyGenerator
26
     */
27
    public static function english()
28
    {
29
        return self::create(new EnglishWordList());
30
    }
31
}
32