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