@@ 1553-1561 (lines=9) @@ | ||
1550 | * |
|
1551 | * @throws InvalidArgumentException |
|
1552 | */ |
|
1553 | public static function methodExists($classOrObject, $method, $message = '') |
|
1554 | { |
|
1555 | if (!\method_exists($classOrObject, $method)) { |
|
1556 | static::reportInvalidArgument(\sprintf( |
|
1557 | $message ?: 'Expected the method %s to exist.', |
|
1558 | static::valueToString($method) |
|
1559 | )); |
|
1560 | } |
|
1561 | } |
|
1562 | ||
1563 | /** |
|
1564 | * @param string|object $classOrObject |
|
@@ 1570-1578 (lines=9) @@ | ||
1567 | * |
|
1568 | * @throws InvalidArgumentException |
|
1569 | */ |
|
1570 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
1571 | { |
|
1572 | if (\method_exists($classOrObject, $method)) { |
|
1573 | static::reportInvalidArgument(\sprintf( |
|
1574 | $message ?: 'Expected the method %s to not exist.', |
|
1575 | static::valueToString($method) |
|
1576 | )); |
|
1577 | } |
|
1578 | } |
|
1579 | ||
1580 | /** |
|
1581 | * @param array $array |