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