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