Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
18 | abstract class Analyzer |
||
19 | { |
||
20 | /** |
||
21 | * @var Text |
||
22 | */ |
||
23 | protected $text; |
||
24 | |||
25 | /** |
||
26 | * Устанавливает аналезируемый текст |
||
27 | * |
||
28 | * @param Text $text |
||
29 | * |
||
30 | * @return Analyzer |
||
31 | */ |
||
32 | 14 | public function setText(Text $text) |
|
33 | { |
||
34 | 14 | $this->clear(); |
|
35 | 14 | $this->text = $text; |
|
36 | |||
37 | 14 | return $this; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * Возвращает список слов. |
||
42 | * |
||
43 | * @return Text |
||
44 | */ |
||
45 | 14 | public function getText() |
|
46 | { |
||
47 | 14 | return $this->text; |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * Очищает анализатор |
||
52 | * |
||
53 | * @return Analyzer |
||
54 | */ |
||
55 | 15 | public function clear() |
|
56 | { |
||
57 | 15 | $this->text = null; |
|
58 | |||
59 | 15 | return $this; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * Возвращает фабрику фильтров для применения их. |
||
64 | * |
||
65 | * @return Factory |
||
66 | */ |
||
67 | 9 | public function applyFilters() |
|
70 | } |
||
71 | } |
||
72 |