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