| @@ 945-953 (lines=9) @@ | ||
| 942 | } |
|
| 943 | } |
|
| 944 | ||
| 945 | public static function propertyExists($classOrObject, $property, $message = '') |
|
| 946 | { |
|
| 947 | if (!property_exists($classOrObject, $property)) { |
|
| 948 | static::reportInvalidArgument(sprintf( |
|
| 949 | $message ?: 'Expected the property %s to exist.', |
|
| 950 | static::valueToString($property) |
|
| 951 | )); |
|
| 952 | } |
|
| 953 | } |
|
| 954 | ||
| 955 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
| 956 | { |
|
| @@ 955-963 (lines=9) @@ | ||
| 952 | } |
|
| 953 | } |
|
| 954 | ||
| 955 | public static function propertyNotExists($classOrObject, $property, $message = '') |
|
| 956 | { |
|
| 957 | if (property_exists($classOrObject, $property)) { |
|
| 958 | static::reportInvalidArgument(sprintf( |
|
| 959 | $message ?: 'Expected the property %s to not exist.', |
|
| 960 | static::valueToString($property) |
|
| 961 | )); |
|
| 962 | } |
|
| 963 | } |
|
| 964 | ||
| 965 | public static function methodExists($classOrObject, $method, $message = '') |
|
| 966 | { |
|