Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

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