| @@ 140-151 (lines=12) @@ | ||
| 137 | * @return bool|null |
|
| 138 | * @throws InvalidArgumentException |
|
| 139 | */ |
|
| 140 | public function deleteItemsByTags(array $tagNames) |
|
| 141 | { |
|
| 142 | $return = null; |
|
| 143 | foreach ($tagNames as $tagName) { |
|
| 144 | $result = $this->deleteItemsByTag($tagName); |
|
| 145 | if ($return !== false) { |
|
| 146 | $return = $result; |
|
| 147 | } |
|
| 148 | } |
|
| 149 | ||
| 150 | return $return; |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * @inheritdoc |
|
| @@ 173-185 (lines=13) @@ | ||
| 170 | /** |
|
| 171 | * @inheritdoc |
|
| 172 | */ |
|
| 173 | public function incrementItemsByTags(array $tagNames, $step = 1) |
|
| 174 | { |
|
| 175 | $return = null; |
|
| 176 | foreach ($tagNames as $tagName) { |
|
| 177 | $result = $this->incrementItemsByTag($tagName, $step); |
|
| 178 | if ($return !== false) { |
|
| 179 | $return = $result; |
|
| 180 | } |
|
| 181 | } |
|
| 182 | ||
| 183 | return $return; |
|
| 184 | } |
|
| 185 | ||
| 186 | /** |
|
| 187 | * @inheritdoc |
|
| 188 | */ |
|
| @@ 206-218 (lines=13) @@ | ||
| 203 | /** |
|
| 204 | * @inheritdoc |
|
| 205 | */ |
|
| 206 | public function decrementItemsByTags(array $tagNames, $step = 1) |
|
| 207 | { |
|
| 208 | $return = null; |
|
| 209 | foreach ($tagNames as $tagName) { |
|
| 210 | $result = $this->decrementItemsByTag($tagName, $step); |
|
| 211 | if ($return !== false) { |
|
| 212 | $return = $result; |
|
| 213 | } |
|
| 214 | } |
|
| 215 | ||
| 216 | return $return; |
|
| 217 | } |
|
| 218 | ||
| 219 | /** |
|
| 220 | * @inheritdoc |
|
| 221 | */ |
|
| @@ 239-251 (lines=13) @@ | ||
| 236 | /** |
|
| 237 | * @inheritdoc |
|
| 238 | */ |
|
| 239 | public function appendItemsByTags(array $tagNames, $data) |
|
| 240 | { |
|
| 241 | $return = null; |
|
| 242 | foreach ($tagNames as $tagName) { |
|
| 243 | $result = $this->decrementItemsByTag($tagName, $data); |
|
| 244 | if ($return !== false) { |
|
| 245 | $return = $result; |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||
| 249 | return $return; |
|
| 250 | } |
|
| 251 | ||
| 252 | /** |
|
| 253 | * @inheritdoc |
|
| 254 | */ |
|
| @@ 272-284 (lines=13) @@ | ||
| 269 | /** |
|
| 270 | * @inheritdoc |
|
| 271 | */ |
|
| 272 | public function prependItemsByTags(array $tagNames, $data) |
|
| 273 | { |
|
| 274 | $return = null; |
|
| 275 | foreach ($tagNames as $tagName) { |
|
| 276 | $result = $this->decrementItemsByTag($tagName, $data); |
|
| 277 | if ($return !== false) { |
|
| 278 | $return = $result; |
|
| 279 | } |
|
| 280 | } |
|
| 281 | ||
| 282 | return $return; |
|
| 283 | } |
|
| 284 | } |
|