| @@ 1580-1588 (lines=9) @@ | ||
| 1577 | * |
|
| 1578 | * @throws InvalidArgumentException |
|
| 1579 | */ |
|
| 1580 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 1581 | { |
|
| 1582 | if (!\method_exists($classOrObject, $method)) { |
|
| 1583 | static::reportInvalidArgument(\sprintf( |
|
| 1584 | $message ?: 'Expected the method %s to exist.', |
|
| 1585 | static::valueToString($method) |
|
| 1586 | )); |
|
| 1587 | } |
|
| 1588 | } |
|
| 1589 | ||
| 1590 | /** |
|
| 1591 | * @psalm-param class-string|object $classOrObject |
|
| @@ 1599-1607 (lines=9) @@ | ||
| 1596 | * |
|
| 1597 | * @throws InvalidArgumentException |
|
| 1598 | */ |
|
| 1599 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
| 1600 | { |
|
| 1601 | if (\method_exists($classOrObject, $method)) { |
|
| 1602 | static::reportInvalidArgument(\sprintf( |
|
| 1603 | $message ?: 'Expected the method %s to not exist.', |
|
| 1604 | static::valueToString($method) |
|
| 1605 | )); |
|
| 1606 | } |
|
| 1607 | } |
|
| 1608 | ||
| 1609 | /** |
|
| 1610 | * @param array $array |
|