Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class MenuFactory |
||
18 | { |
||
19 | use TLang; |
||
20 | |||
21 | 2 | public function __construct(?IMNTranslations $lang = null) |
|
24 | 2 | } |
|
25 | |||
26 | /** |
||
27 | * @param mixed $params |
||
28 | * @param mixed $parser |
||
29 | * @throws FilesException |
||
30 | * @throws MenuException |
||
31 | * @throws PathsException |
||
32 | * @return MoreEntries |
||
33 | */ |
||
34 | 2 | public function getMenu($params, $parser = null): MoreEntries |
|
35 | { |
||
36 | 2 | return new MoreEntries( |
|
37 | 2 | $this->getProcessor($params, $parser), |
|
38 | 2 | (new EntriesSource\Factory($this->getMnLang()))->getSource($params) |
|
39 | ); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param mixed $params |
||
44 | * @param mixed $parser |
||
45 | * @throws FilesException |
||
46 | * @throws MenuException |
||
47 | * @throws PathsException |
||
48 | * @return MetaProcessor |
||
49 | */ |
||
50 | 2 | public function getProcessor($params, $parser = null): MetaProcessor |
|
55 | ); |
||
56 | } |
||
58 |