| @@ 6211-6225 (lines=15) @@ | ||
| 6208 | * |
|
| 6209 | * @return bool |
|
| 6210 | */ |
|
| 6211 | public function sizeIsGreaterThan(int $size): bool |
|
| 6212 | { |
|
| 6213 | // init |
|
| 6214 | $itemsTempCount = 0; |
|
| 6215 | ||
| 6216 | /** @noinspection PhpUnusedLocalVariableInspection */ |
|
| 6217 | foreach ($this->getGenerator() as $value) { |
|
| 6218 | ++$itemsTempCount; |
|
| 6219 | if ($itemsTempCount > $size) { |
|
| 6220 | return true; |
|
| 6221 | } |
|
| 6222 | } |
|
| 6223 | ||
| 6224 | return $itemsTempCount > $size; |
|
| 6225 | } |
|
| 6226 | ||
| 6227 | /** |
|
| 6228 | * Checks whether array has less than $size items. |
|
| @@ 6234-6248 (lines=15) @@ | ||
| 6231 | * |
|
| 6232 | * @return bool |
|
| 6233 | */ |
|
| 6234 | public function sizeIsLessThan(int $size): bool |
|
| 6235 | { |
|
| 6236 | // init |
|
| 6237 | $itemsTempCount = 0; |
|
| 6238 | ||
| 6239 | /** @noinspection PhpUnusedLocalVariableInspection */ |
|
| 6240 | foreach ($this->getGenerator() as $value) { |
|
| 6241 | ++$itemsTempCount; |
|
| 6242 | if ($itemsTempCount > $size) { |
|
| 6243 | return false; |
|
| 6244 | } |
|
| 6245 | } |
|
| 6246 | ||
| 6247 | return $itemsTempCount < $size; |
|
| 6248 | } |
|
| 6249 | ||
| 6250 | /** |
|
| 6251 | * Counts all elements in an array, or something in an object. |
|