Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3617-3630 (lines=14) @@
3614
     * @return bool
3615
     *              <p>Returns true if associative, false otherwise.</p>
3616
     */
3617
    public function isAssoc(bool $recursive = false): bool
3618
    {
3619
        if ($this->isEmpty()) {
3620
            return false;
3621
        }
3622
3623
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3624
        foreach ($this->keys($recursive)->getGeneratorByReference() as &$key) {
3625
            if ((string) $key !== $key) {
3626
                return false;
3627
            }
3628
        }
3629
3630
        return true;
3631
    }
3632
3633
    /**
@@ 3705-3718 (lines=14) @@
3702
     * @return bool
3703
     *              <p>Returns true if numeric, false otherwise.</p>
3704
     */
3705
    public function isNumeric(): bool
3706
    {
3707
        if ($this->isEmpty()) {
3708
            return false;
3709
        }
3710
3711
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3712
        foreach ($this->keys()->getGeneratorByReference() as &$key) {
3713
            if ((int) $key !== $key) {
3714
                return false;
3715
            }
3716
        }
3717
3718
        return true;
3719
    }
3720
3721
    /**