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