Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

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