Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

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