| @@ 1356-1364 (lines=9) @@ | ||
| 1353 | * @param mixed $property |
|
| 1354 | * @param string $message |
|
| 1355 | */ |
|
| 1356 | public static function propertyExists($classOrObject, $property, $message = '') |
|
| 1357 | { |
|
| 1358 | if (!\property_exists($classOrObject, $property)) { |
|
| 1359 | static::reportInvalidArgument(\sprintf( |
|
| 1360 | $message ?: 'Expected the property %s to exist.', |
|
| 1361 | static::valueToString($property) |
|
| 1362 | )); |
|
| 1363 | } |
|
| 1364 | } |
|
| 1365 | ||
| 1366 | /** |
|
| 1367 | * @param string|object $classOrObject |
|
| @@ 1371-1379 (lines=9) @@ | ||
| 1368 | * @param mixed $property |
|
| 1369 | * @param string $message |
|
| 1370 | */ |
|
| 1371 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
| 1372 | { |
|
| 1373 | if (\property_exists($classOrObject, $property)) { |
|
| 1374 | static::reportInvalidArgument(\sprintf( |
|
| 1375 | $message ?: 'Expected the property %s to not exist.', |
|
| 1376 | static::valueToString($property) |
|
| 1377 | )); |
|
| 1378 | } |
|
| 1379 | } |
|
| 1380 | ||
| 1381 | /** |
|
| 1382 | * @param string|object $classOrObject |
|