Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3692-3705 (lines=14) @@
3689
     * @return bool
3690
     *              <p>Returns true if associative, false otherwise.</p>
3691
     */
3692
    public function isAssoc(bool $recursive = false): bool
3693
    {
3694
        if ($this->isEmpty()) {
3695
            return false;
3696
        }
3697
3698
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3699
        foreach ($this->keys($recursive)->getGeneratorByReference() as &$key) {
3700
            if ((string) $key !== $key) {
3701
                return false;
3702
            }
3703
        }
3704
3705
        return true;
3706
    }
3707
3708
    /**
@@ 3780-3793 (lines=14) @@
3777
     * @return bool
3778
     *              <p>Returns true if numeric, false otherwise.</p>
3779
     */
3780
    public function isNumeric(): bool
3781
    {
3782
        if ($this->isEmpty()) {
3783
            return false;
3784
        }
3785
3786
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3787
        foreach ($this->keys()->getGeneratorByReference() as &$key) {
3788
            if ((int) $key !== $key) {
3789
                return false;
3790
            }
3791
        }
3792
3793
        return true;
3794
    }
3795
3796
    /**