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