Total Complexity | 7 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class Summary |
||
17 | { |
||
18 | public $taskName; |
||
19 | public $prefix = ''; |
||
20 | public $citationNumber = 0; |
||
21 | public $botFlag = false; |
||
22 | public $minorFlag = false; |
||
23 | public $memo = []; |
||
24 | |||
25 | /** |
||
26 | * Summary constructor. |
||
27 | * |
||
28 | * @param $taskName |
||
29 | */ |
||
30 | public function __construct(string $taskName) |
||
31 | { |
||
32 | $this->taskName = $taskName; |
||
33 | } |
||
34 | |||
35 | public function serialize(): string |
||
36 | { |
||
37 | $prefixSummary = ($this->botFlag) ? 'bot: ' : ''; |
||
38 | |||
39 | return trim($prefixSummary.$this->taskName); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function isBotFlag(): bool |
||
46 | { |
||
47 | return $this->botFlag; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param bool $botFlag |
||
52 | */ |
||
53 | public function setBotFlag(bool $botFlag): void |
||
54 | { |
||
55 | $this->botFlag = $botFlag; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function isMinorFlag(): bool |
||
62 | { |
||
63 | return $this->minorFlag; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @param bool $minorFlag |
||
68 | */ |
||
69 | public function setMinorFlag(bool $minorFlag): void |
||
72 | } |
||
73 | |||
74 | } |
||
75 |