@@ 116-127 (lines=12) @@ | ||
113 | * @return bool|null |
|
114 | * @throws InvalidArgumentException |
|
115 | */ |
|
116 | public function deleteItemsByTags(array $tagNames) |
|
117 | { |
|
118 | $return = null; |
|
119 | foreach ($tagNames as $tagName) { |
|
120 | $result = $this->deleteItemsByTag($tagName); |
|
121 | if ($return !== false) { |
|
122 | $return = $result; |
|
123 | } |
|
124 | } |
|
125 | ||
126 | return $return; |
|
127 | } |
|
128 | ||
129 | /** |
|
130 | * @inheritdoc |
|
@@ 149-161 (lines=13) @@ | ||
146 | /** |
|
147 | * @inheritdoc |
|
148 | */ |
|
149 | public function incrementItemsByTags(array $tagNames, $step = 1) |
|
150 | { |
|
151 | $return = null; |
|
152 | foreach ($tagNames as $tagName) { |
|
153 | $result = $this->incrementItemsByTag($tagName, $step); |
|
154 | if ($return !== false) { |
|
155 | $return = $result; |
|
156 | } |
|
157 | } |
|
158 | ||
159 | return $return; |
|
160 | } |
|
161 | ||
162 | /** |
|
163 | * @inheritdoc |
|
164 | */ |
|
@@ 182-194 (lines=13) @@ | ||
179 | /** |
|
180 | * @inheritdoc |
|
181 | */ |
|
182 | public function decrementItemsByTags(array $tagNames, $step = 1) |
|
183 | { |
|
184 | $return = null; |
|
185 | foreach ($tagNames as $tagName) { |
|
186 | $result = $this->decrementItemsByTag($tagName, $step); |
|
187 | if ($return !== false) { |
|
188 | $return = $result; |
|
189 | } |
|
190 | } |
|
191 | ||
192 | return $return; |
|
193 | } |
|
194 | ||
195 | /** |
|
196 | * @inheritdoc |
|
197 | */ |
|
@@ 215-227 (lines=13) @@ | ||
212 | /** |
|
213 | * @inheritdoc |
|
214 | */ |
|
215 | public function appendItemsByTags(array $tagNames, $data) |
|
216 | { |
|
217 | $return = null; |
|
218 | foreach ($tagNames as $tagName) { |
|
219 | $result = $this->decrementItemsByTag($tagName, $data); |
|
220 | if ($return !== false) { |
|
221 | $return = $result; |
|
222 | } |
|
223 | } |
|
224 | ||
225 | return $return; |
|
226 | } |
|
227 | ||
228 | /** |
|
229 | * @inheritdoc |
|
230 | */ |
|
@@ 248-260 (lines=13) @@ | ||
245 | /** |
|
246 | * @inheritdoc |
|
247 | */ |
|
248 | public function prependItemsByTags(array $tagNames, $data) |
|
249 | { |
|
250 | $return = null; |
|
251 | foreach ($tagNames as $tagName) { |
|
252 | $result = $this->decrementItemsByTag($tagName, $data); |
|
253 | if ($return !== false) { |
|
254 | $return = $result; |
|
255 | } |
|
256 | } |
|
257 | ||
258 | return $return; |
|
259 | } |
|
260 | } |