| @@ 1533-1541 (lines=9) @@ | ||
| 1530 | * |
|
| 1531 | * @throws InvalidArgumentException |
|
| 1532 | */ |
|
| 1533 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 1534 | { |
|
| 1535 | if (!\method_exists($classOrObject, $method)) { |
|
| 1536 | static::reportInvalidArgument(\sprintf( |
|
| 1537 | $message ?: 'Expected the method %s to exist.', |
|
| 1538 | static::valueToString($method) |
|
| 1539 | )); |
|
| 1540 | } |
|
| 1541 | } |
|
| 1542 | ||
| 1543 | /** |
|
| 1544 | * @param string|object $classOrObject |
|
| @@ 1550-1558 (lines=9) @@ | ||
| 1547 | * |
|
| 1548 | * @throws InvalidArgumentException |
|
| 1549 | */ |
|
| 1550 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 1551 | { |
|
| 1552 | if (\method_exists($classOrObject, $method)) { |
|
| 1553 | static::reportInvalidArgument(\sprintf( |
|
| 1554 | $message ?: 'Expected the method %s to not exist.', |
|
| 1555 | static::valueToString($method) |
|
| 1556 | )); |
|
| 1557 | } |
|
| 1558 | } |
|
| 1559 | ||
| 1560 | /** |
|
| 1561 | * @param array $array |
|