| @@ 84-95 (lines=12) @@ | ||
| 81 | * @return bool|null |
|
| 82 | * @throws InvalidArgumentException |
|
| 83 | */ |
|
| 84 | public function deleteItemsByTags(array $tagNames) |
|
| 85 | { |
|
| 86 | $return = null; |
|
| 87 | foreach ($tagNames as $tagName) { |
|
| 88 | $result = $this->deleteItemsByTag($tagName); |
|
| 89 | if ($return !== false) { |
|
| 90 | $return = $result; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| 94 | return $return; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @inheritdoc |
|
| @@ 116-128 (lines=13) @@ | ||
| 113 | /** |
|
| 114 | * @inheritdoc |
|
| 115 | */ |
|
| 116 | public function incrementItemsByTags(array $tagNames, $step = 1) |
|
| 117 | { |
|
| 118 | $return = null; |
|
| 119 | foreach ($tagNames as $tagName) |
|
| 120 | { |
|
| 121 | $result = $this->incrementItemsByTag($tagName, $step); |
|
| 122 | if ($return !== false) { |
|
| 123 | $return = $result; |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||
| 127 | return $return; |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * @inheritdoc |
|
| @@ 149-161 (lines=13) @@ | ||
| 146 | /** |
|
| 147 | * @inheritdoc |
|
| 148 | */ |
|
| 149 | public function decrementItemsByTags(array $tagNames, $step = 1) |
|
| 150 | { |
|
| 151 | $return = null; |
|
| 152 | foreach ($tagNames as $tagName) |
|
| 153 | { |
|
| 154 | $result = $this->decrementItemsByTag($tagName, $step); |
|
| 155 | if ($return !== false) { |
|
| 156 | $return = $result; |
|
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | return $return; |
|
| 161 | } |
|
| 162 | ||
| 163 | /** |
|
| 164 | * @inheritdoc |
|
| @@ 182-194 (lines=13) @@ | ||
| 179 | /** |
|
| 180 | * @inheritdoc |
|
| 181 | */ |
|
| 182 | public function appendItemsByTags(array $tagNames, $data) |
|
| 183 | { |
|
| 184 | $return = null; |
|
| 185 | foreach ($tagNames as $tagName) |
|
| 186 | { |
|
| 187 | $result = $this->decrementItemsByTag($tagName, $data); |
|
| 188 | if ($return !== false) { |
|
| 189 | $return = $result; |
|
| 190 | } |
|
| 191 | } |
|
| 192 | ||
| 193 | return $return; |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * @inheritdoc |
|
| @@ 215-227 (lines=13) @@ | ||
| 212 | /** |
|
| 213 | * @inheritdoc |
|
| 214 | */ |
|
| 215 | public function prependItemsByTags(array $tagNames, $data) |
|
| 216 | { |
|
| 217 | $return = null; |
|
| 218 | foreach ($tagNames as $tagName) |
|
| 219 | { |
|
| 220 | $result = $this->decrementItemsByTag($tagName, $data); |
|
| 221 | if ($return !== false) { |
|
| 222 | $return = $result; |
|
| 223 | } |
|
| 224 | } |
|
| 225 | ||
| 226 | return $return; |
|
| 227 | } |
|
| 228 | } |
|