Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3645-3658 (lines=14) @@
3642
     * @return bool
3643
     *              <p>Returns true if associative, false otherwise.</p>
3644
     */
3645
    public function isAssoc(bool $recursive = false): bool
3646
    {
3647
        if ($this->isEmpty()) {
3648
            return false;
3649
        }
3650
3651
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3652
        foreach ($this->keys($recursive)->getGeneratorByReference() as &$key) {
3653
            if ((string) $key !== $key) {
3654
                return false;
3655
            }
3656
        }
3657
3658
        return true;
3659
    }
3660
3661
    /**
@@ 3733-3746 (lines=14) @@
3730
     * @return bool
3731
     *              <p>Returns true if numeric, false otherwise.</p>
3732
     */
3733
    public function isNumeric(): bool
3734
    {
3735
        if ($this->isEmpty()) {
3736
            return false;
3737
        }
3738
3739
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3740
        foreach ($this->keys()->getGeneratorByReference() as &$key) {
3741
            if ((int) $key !== $key) {
3742
                return false;
3743
            }
3744
        }
3745
3746
        return true;
3747
    }
3748
3749
    /**