@@ 6233-6247 (lines=15) @@ | ||
6230 | * |
|
6231 | * @return bool |
|
6232 | */ |
|
6233 | public function sizeIsGreaterThan(int $size): bool |
|
6234 | { |
|
6235 | // init |
|
6236 | $itemsTempCount = 0; |
|
6237 | ||
6238 | /** @noinspection PhpUnusedLocalVariableInspection */ |
|
6239 | foreach ($this->getGenerator() as $value) { |
|
6240 | ++$itemsTempCount; |
|
6241 | if ($itemsTempCount > $size) { |
|
6242 | return true; |
|
6243 | } |
|
6244 | } |
|
6245 | ||
6246 | return $itemsTempCount > $size; |
|
6247 | } |
|
6248 | ||
6249 | /** |
|
6250 | * Checks whether array has less than $size items. |
|
@@ 6256-6270 (lines=15) @@ | ||
6253 | * |
|
6254 | * @return bool |
|
6255 | */ |
|
6256 | public function sizeIsLessThan(int $size): bool |
|
6257 | { |
|
6258 | // init |
|
6259 | $itemsTempCount = 0; |
|
6260 | ||
6261 | /** @noinspection PhpUnusedLocalVariableInspection */ |
|
6262 | foreach ($this->getGenerator() as $value) { |
|
6263 | ++$itemsTempCount; |
|
6264 | if ($itemsTempCount > $size) { |
|
6265 | return false; |
|
6266 | } |
|
6267 | } |
|
6268 | ||
6269 | return $itemsTempCount < $size; |
|
6270 | } |
|
6271 | ||
6272 | /** |
|
6273 | * Counts all elements in an array, or something in an object. |