| @@ 3699-3712 (lines=14) @@ | ||
| 3696 | * |
|
| 3697 | * @return bool |
|
| 3698 | */ |
|
| 3699 | public function sizeIs(int $size): bool |
|
| 3700 | { |
|
| 3701 | // init |
|
| 3702 | $itemsTempCount = 0; |
|
| 3703 | ||
| 3704 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3705 | ++$itemsTempCount; |
|
| 3706 | if ($itemsTempCount > $size) { |
|
| 3707 | return false; |
|
| 3708 | } |
|
| 3709 | } |
|
| 3710 | ||
| 3711 | return $itemsTempCount === $size; |
|
| 3712 | } |
|
| 3713 | ||
| 3714 | /** |
|
| 3715 | * Checks whether array has less than $size items. |
|
| @@ 3721-3734 (lines=14) @@ | ||
| 3718 | * |
|
| 3719 | * @return bool |
|
| 3720 | */ |
|
| 3721 | public function sizeIsLessThan(int $size): bool |
|
| 3722 | { |
|
| 3723 | // init |
|
| 3724 | $itemsTempCount = 0; |
|
| 3725 | ||
| 3726 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3727 | ++$itemsTempCount; |
|
| 3728 | if ($itemsTempCount > $size) { |
|
| 3729 | return false; |
|
| 3730 | } |
|
| 3731 | } |
|
| 3732 | ||
| 3733 | return $itemsTempCount < $size; |
|
| 3734 | } |
|
| 3735 | ||
| 3736 | /** |
|
| 3737 | * Checks whether array has more than $size items. |
|
| @@ 3743-3756 (lines=14) @@ | ||
| 3740 | * |
|
| 3741 | * @return bool |
|
| 3742 | */ |
|
| 3743 | public function sizeIsGreaterThan(int $size): bool |
|
| 3744 | { |
|
| 3745 | // init |
|
| 3746 | $itemsTempCount = 0; |
|
| 3747 | ||
| 3748 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3749 | ++$itemsTempCount; |
|
| 3750 | if ($itemsTempCount > $size) { |
|
| 3751 | return true; |
|
| 3752 | } |
|
| 3753 | } |
|
| 3754 | ||
| 3755 | return $itemsTempCount > $size; |
|
| 3756 | } |
|
| 3757 | ||
| 3758 | /** |
|
| 3759 | * Checks whether array has between $fromSize to $toSize items. $toSize can be |
|