| @@ 49-57 (lines=9) @@ | ||
| 46 | /** |
|
| 47 | * @return string|null |
|
| 48 | */ |
|
| 49 | public function getState() |
|
| 50 | { |
|
| 51 | $notes = $this->getAllInCategory('state'); |
|
| 52 | foreach ($notes as $note) { |
|
| 53 | if (isset($note['content'])) { |
|
| 54 | return $note['content']; |
|
| 55 | } |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * @param string $state |
|
| @@ 71-81 (lines=11) @@ | ||
| 68 | /** |
|
| 69 | * @return string|null |
|
| 70 | */ |
|
| 71 | public function getDesc() |
|
| 72 | { |
|
| 73 | $notes = $this->getAllInCategory('desc'); |
|
| 74 | foreach ($notes as $note) { |
|
| 75 | if (isset($note['content'])) { |
|
| 76 | return $note['content']; |
|
| 77 | } |
|
| 78 | } |
|
| 79 | ||
| 80 | return null; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * Get the extracted translation if any. |
|
| @@ 88-98 (lines=11) @@ | ||
| 85 | * |
|
| 86 | * @return string|null |
|
| 87 | */ |
|
| 88 | public function getTranslation() |
|
| 89 | { |
|
| 90 | $notes = $this->getAllInCategory('translation'); |
|
| 91 | foreach ($notes as $note) { |
|
| 92 | if (isset($note['content'])) { |
|
| 93 | return $note['content']; |
|
| 94 | } |
|
| 95 | } |
|
| 96 | ||
| 97 | return null; |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * @return bool |
|
| @@ 103-113 (lines=11) @@ | ||
| 100 | /** |
|
| 101 | * @return bool |
|
| 102 | */ |
|
| 103 | public function isApproved() |
|
| 104 | { |
|
| 105 | $notes = $this->getAllInCategory('approved'); |
|
| 106 | foreach ($notes as $note) { |
|
| 107 | if (isset($note['content'])) { |
|
| 108 | return 'true' === $note['content']; |
|
| 109 | } |
|
| 110 | } |
|
| 111 | ||
| 112 | return false; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @param bool $bool |
|