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