@@ 1431-1439 (lines=9) @@ | ||
1428 | * @param mixed $method |
|
1429 | * @param string $message |
|
1430 | */ |
|
1431 | public static function methodExists($classOrObject, $method, $message = '') |
|
1432 | { |
|
1433 | if (!\method_exists($classOrObject, $method)) { |
|
1434 | static::reportInvalidArgument(\sprintf( |
|
1435 | $message ?: 'Expected the method %s to exist.', |
|
1436 | static::valueToString($method) |
|
1437 | )); |
|
1438 | } |
|
1439 | } |
|
1440 | ||
1441 | /** |
|
1442 | * @param string|object $classOrObject |
|
@@ 1446-1454 (lines=9) @@ | ||
1443 | * @param mixed $method |
|
1444 | * @param string $message |
|
1445 | */ |
|
1446 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
1447 | { |
|
1448 | if (\method_exists($classOrObject, $method)) { |
|
1449 | static::reportInvalidArgument(\sprintf( |
|
1450 | $message ?: 'Expected the method %s to not exist.', |
|
1451 | static::valueToString($method) |
|
1452 | )); |
|
1453 | } |
|
1454 | } |
|
1455 | ||
1456 | /** |
|
1457 | * @param array $array |