| @@ 1401-1409 (lines=9) @@ | ||
| 1398 | * @param mixed $property |
|
| 1399 | * @param string $message |
|
| 1400 | */ |
|
| 1401 | public static function propertyExists($classOrObject, $property, $message = '') |
|
| 1402 | { |
|
| 1403 | if (!\property_exists($classOrObject, $property)) { |
|
| 1404 | static::reportInvalidArgument(\sprintf( |
|
| 1405 | $message ?: 'Expected the property %s to exist.', |
|
| 1406 | static::valueToString($property) |
|
| 1407 | )); |
|
| 1408 | } |
|
| 1409 | } |
|
| 1410 | ||
| 1411 | /** |
|
| 1412 | * @param string|object $classOrObject |
|
| @@ 1416-1424 (lines=9) @@ | ||
| 1413 | * @param mixed $property |
|
| 1414 | * @param string $message |
|
| 1415 | */ |
|
| 1416 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
| 1417 | { |
|
| 1418 | if (\property_exists($classOrObject, $property)) { |
|
| 1419 | static::reportInvalidArgument(\sprintf( |
|
| 1420 | $message ?: 'Expected the property %s to not exist.', |
|
| 1421 | static::valueToString($property) |
|
| 1422 | )); |
|
| 1423 | } |
|
| 1424 | } |
|
| 1425 | ||
| 1426 | /** |
|
| 1427 | * @param string|object $classOrObject |
|