@@ 1384-1392 (lines=9) @@ | ||
1381 | * @param mixed $method |
|
1382 | * @param string $message |
|
1383 | */ |
|
1384 | public static function methodExists($classOrObject, $method, $message = '') |
|
1385 | { |
|
1386 | if (!\method_exists($classOrObject, $method)) { |
|
1387 | static::reportInvalidArgument(\sprintf( |
|
1388 | $message ?: 'Expected the method %s to exist.', |
|
1389 | static::valueToString($method) |
|
1390 | )); |
|
1391 | } |
|
1392 | } |
|
1393 | ||
1394 | /** |
|
1395 | * @param string|object $classOrObject |
|
@@ 1399-1407 (lines=9) @@ | ||
1396 | * @param mixed $method |
|
1397 | * @param string $message |
|
1398 | */ |
|
1399 | public static function methodNotExists($classOrObject, $method, $message = '') |
|
1400 | { |
|
1401 | if (\method_exists($classOrObject, $method)) { |
|
1402 | static::reportInvalidArgument(\sprintf( |
|
1403 | $message ?: 'Expected the method %s to not exist.', |
|
1404 | static::valueToString($method) |
|
1405 | )); |
|
1406 | } |
|
1407 | } |
|
1408 | ||
1409 | /** |
|
1410 | * @param array $array |