| @@ 3715-3728 (lines=14) @@ | ||
| 3712 | * |
|
| 3713 | * @return bool |
|
| 3714 | */ |
|
| 3715 | public function sizeIs(int $size): bool |
|
| 3716 | { |
|
| 3717 | // init |
|
| 3718 | $itemsTempCount = 0; |
|
| 3719 | ||
| 3720 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3721 | ++$itemsTempCount; |
|
| 3722 | if ($itemsTempCount > $size) { |
|
| 3723 | return false; |
|
| 3724 | } |
|
| 3725 | } |
|
| 3726 | ||
| 3727 | return $itemsTempCount === $size; |
|
| 3728 | } |
|
| 3729 | ||
| 3730 | /** |
|
| 3731 | * Checks whether array has less than $size items. |
|
| @@ 3737-3750 (lines=14) @@ | ||
| 3734 | * |
|
| 3735 | * @return bool |
|
| 3736 | */ |
|
| 3737 | public function sizeIsLessThan(int $size): bool |
|
| 3738 | { |
|
| 3739 | // init |
|
| 3740 | $itemsTempCount = 0; |
|
| 3741 | ||
| 3742 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3743 | ++$itemsTempCount; |
|
| 3744 | if ($itemsTempCount > $size) { |
|
| 3745 | return false; |
|
| 3746 | } |
|
| 3747 | } |
|
| 3748 | ||
| 3749 | return $itemsTempCount < $size; |
|
| 3750 | } |
|
| 3751 | ||
| 3752 | /** |
|
| 3753 | * Checks whether array has more than $size items. |
|
| @@ 3759-3772 (lines=14) @@ | ||
| 3756 | * |
|
| 3757 | * @return bool |
|
| 3758 | */ |
|
| 3759 | public function sizeIsGreaterThan(int $size): bool |
|
| 3760 | { |
|
| 3761 | // init |
|
| 3762 | $itemsTempCount = 0; |
|
| 3763 | ||
| 3764 | foreach ($this->getGenerator() as $key => $value) { |
|
| 3765 | ++$itemsTempCount; |
|
| 3766 | if ($itemsTempCount > $size) { |
|
| 3767 | return true; |
|
| 3768 | } |
|
| 3769 | } |
|
| 3770 | ||
| 3771 | return $itemsTempCount > $size; |
|
| 3772 | } |
|
| 3773 | ||
| 3774 | /** |
|
| 3775 | * Checks whether array has between $fromSize to $toSize items. $toSize can be |
|