WordList   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 7

4 Methods

Rating   Name   Duplication   Size   Complexity  
A animal() 0 3 1
A adjective() 0 3 1
A noun() 0 3 1
A getFileName() 0 7 4
1
<?php
2
3
namespace Kaliop\eZLoremIpsumBundle\Faker\Provider;
4
5
class WordList extends AbstractWordList
6
{
7
    protected function getFileName($context = '')
8
    {
9
        switch ($context) {
10
            case 'animals':
11
            case 'adjectives':
12
            case 'nouns':
13
                return __DIR__ . '/../../Resources/wordslists/' . $context . '.txt';
14
        }
15
    }
16
17
    public function animal()
18
    {
19
        return $this->getLine('animals');
20
    }
21
22
    public function adjective()
23
    {
24
        return $this->getLine('adjectives');
25
    }
26
27
    public function noun()
28
    {
29
        return $this->getLine('nouns');
30
    }
31
}
32