Code Duplication    Length = 12-12 lines in 2 locations

src/Assert.php 2 locations

@@ 1688-1699 (lines=12) @@
1685
     *
1686
     * @throws InvalidArgumentException
1687
     */
1688
    public static function minCount($array, $min, $message = '')
1689
    {
1690
        static::isCountable($array, $message);
1691
1692
        if (\count($array) < $min) {
1693
            static::reportInvalidArgument(\sprintf(
1694
                $message ?: 'Expected an array to contain at least %2$d elements. Got: %d',
1695
                \count($array),
1696
                $min
1697
            ));
1698
        }
1699
    }
1700
1701
    /**
1702
     * @param mixed     $array
@@ 1708-1719 (lines=12) @@
1705
     *
1706
     * @throws InvalidArgumentException
1707
     */
1708
    public static function maxCount($array, $max, $message = '')
1709
    {
1710
        static::isCountable($array, $message);
1711
1712
        if (\count($array) > $max) {
1713
            static::reportInvalidArgument(\sprintf(
1714
                $message ?: 'Expected an array to contain at most %2$d elements. Got: %d',
1715
                \count($array),
1716
                $max
1717
            ));
1718
        }
1719
    }
1720
1721
    /**
1722
     * @param mixed     $array