@@ 1618-1626 (lines=9) @@ | ||
1615 | * |
|
1616 | * @throws InvalidArgumentException |
|
1617 | */ |
|
1618 | public static function methodExists($classOrObject, $method, $message = '') |
|
1619 | { |
|
1620 | if (!\method_exists($classOrObject, $method)) { |
|
1621 | static::reportInvalidArgument(\sprintf( |
|
1622 | $message ?: 'Expected the method %s to exist.', |
|
1623 | static::valueToString($method) |
|
1624 | )); |
|
1625 | } |
|
1626 | } |
|
1627 | ||
1628 | /** |
|
1629 | * @param string|object $classOrObject |
|
@@ 1635-1643 (lines=9) @@ | ||
1632 | * |
|
1633 | * @throws InvalidArgumentException |
|
1634 | */ |
|
1635 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
1636 | { |
|
1637 | if (\method_exists($classOrObject, $method)) { |
|
1638 | static::reportInvalidArgument(\sprintf( |
|
1639 | $message ?: 'Expected the method %s to not exist.', |
|
1640 | static::valueToString($method) |
|
1641 | )); |
|
1642 | } |
|
1643 | } |
|
1644 | ||
1645 | /** |
|
1646 | * @param array $array |