Code Duplication    Length = 14-14 lines in 2 locations

src/Arrayy.php 2 locations

@@ 3299-3312 (lines=14) @@
3296
     * @return bool
3297
     *              <p>Returns true if associative, false otherwise.</p>
3298
     */
3299
    public function isAssoc(bool $recursive = false): bool
3300
    {
3301
        if ($this->isEmpty()) {
3302
            return false;
3303
        }
3304
3305
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3306
        foreach ($this->keys($recursive)->getGeneratorByReference() as &$key) {
3307
            if ((string) $key !== $key) {
3308
                return false;
3309
            }
3310
        }
3311
3312
        return true;
3313
    }
3314
3315
    /**
@@ 3377-3390 (lines=14) @@
3374
     * @return bool
3375
     *              <p>Returns true if numeric, false otherwise.</p>
3376
     */
3377
    public function isNumeric(): bool
3378
    {
3379
        if ($this->isEmpty()) {
3380
            return false;
3381
        }
3382
3383
        /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */
3384
        foreach ($this->keys()->getGeneratorByReference() as &$key) {
3385
            if ((int) $key !== $key) {
3386
                return false;
3387
            }
3388
        }
3389
3390
        return true;
3391
    }
3392
3393
    /**