@@ 6016-6029 (lines=14) @@ | ||
6013 | * |
|
6014 | * @return bool |
|
6015 | */ |
|
6016 | public function sizeIsGreaterThan(int $size): bool |
|
6017 | { |
|
6018 | // init |
|
6019 | $itemsTempCount = 0; |
|
6020 | ||
6021 | foreach ($this->getGenerator() as $key => $value) { |
|
6022 | ++$itemsTempCount; |
|
6023 | if ($itemsTempCount > $size) { |
|
6024 | return true; |
|
6025 | } |
|
6026 | } |
|
6027 | ||
6028 | return $itemsTempCount > $size; |
|
6029 | } |
|
6030 | ||
6031 | /** |
|
6032 | * Checks whether array has less than $size items. |
|
@@ 6038-6051 (lines=14) @@ | ||
6035 | * |
|
6036 | * @return bool |
|
6037 | */ |
|
6038 | public function sizeIsLessThan(int $size): bool |
|
6039 | { |
|
6040 | // init |
|
6041 | $itemsTempCount = 0; |
|
6042 | ||
6043 | foreach ($this->getGenerator() as $key => $value) { |
|
6044 | ++$itemsTempCount; |
|
6045 | if ($itemsTempCount > $size) { |
|
6046 | return false; |
|
6047 | } |
|
6048 | } |
|
6049 | ||
6050 | return $itemsTempCount < $size; |
|
6051 | } |
|
6052 | ||
6053 | /** |
|
6054 | * Counts all elements in an array, or something in an object. |