Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 510-518 (lines=9) @@
507
     *
508
     * @throws InvalidArgumentException
509
     */
510
    public static function isArrayAccessible($value, $message = '')
511
    {
512
        if (!\is_array($value) && !($value instanceof ArrayAccess)) {
513
            static::reportInvalidArgument(\sprintf(
514
                $message ?: 'Expected an array accessible. Got: %s',
515
                static::typeToString($value)
516
            ));
517
        }
518
    }
519
520
    /**
521
     * @psalm-pure
@@ 553-561 (lines=9) @@
550
     *
551
     * @throws InvalidArgumentException
552
     */
553
    public static function isIterable($value, $message = '')
554
    {
555
        if (!\is_array($value) && !($value instanceof Traversable)) {
556
            static::reportInvalidArgument(\sprintf(
557
                $message ?: 'Expected an iterable. Got: %s',
558
                static::typeToString($value)
559
            ));
560
        }
561
    }
562
563
    /**
564
     * @psalm-pure