We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 138-144 (lines=7) @@ | ||
| 135 | * |
|
| 136 | * @return mixed |
|
| 137 | */ |
|
| 138 | protected function getValue( $object, $property_name ) { |
|
| 139 | $reflection = new \ReflectionClass( get_class( $object ) ); |
|
| 140 | $property = $reflection->getProperty( $property_name ); |
|
| 141 | $property->setAccessible( true ); |
|
| 142 | ||
| 143 | return $property->getValue( $object ); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Helper function to generate a valid token list from strings. |
|
| @@ 260-266 (lines=7) @@ | ||
| 257 | * @param object $object The object. |
|
| 258 | * @param string $message Optional. Default ''. |
|
| 259 | */ |
|
| 260 | protected function assertAttributeArrayHasKey( $key, $attribute, $object, $message = '' ) { |
|
| 261 | $ref = new \ReflectionClass( get_class( $object ) ); |
|
| 262 | $prop = $ref->getProperty( $attribute ); |
|
| 263 | $prop->setAccessible( true ); |
|
| 264 | ||
| 265 | return $this->assertArrayHasKey( $key, $prop->getValue( $object ), $message ); |
|
| 266 | } |
|
| 267 | ||
| 268 | /** |
|
| 269 | * Reports an error identified by $message if $attribute in $object does have the $key. |
|
| @@ 276-282 (lines=7) @@ | ||
| 273 | * @param object $object The object. |
|
| 274 | * @param string $message Optional. Default ''. |
|
| 275 | */ |
|
| 276 | protected function assertAttributeArrayNotHasKey( $key, $attribute, $object, $message = '' ) { |
|
| 277 | $ref = new \ReflectionClass( get_class( $object ) ); |
|
| 278 | $prop = $ref->getProperty( $attribute ); |
|
| 279 | $prop->setAccessible( true ); |
|
| 280 | ||
| 281 | return $this->assertArrayNotHasKey( $key, $prop->getValue( $object ), $message ); |
|
| 282 | } |
|
| 283 | ||
| 284 | /** |
|
| 285 | * Assert that the given quote styles match. |
|