We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 93-98 (lines=6) @@ | ||
| 90 | * @param string $property_name Property to set. |
|
| 91 | * @param mixed|null $value The new value. |
|
| 92 | */ |
|
| 93 | protected function setStaticValue( $classname, $property_name, $value ) { |
|
| 94 | $reflection = new \ReflectionClass( $classname ); |
|
| 95 | $property = $reflection->getProperty( $property_name ); |
|
| 96 | $property->setAccessible( true ); |
|
| 97 | $property->setValue( $value ); |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * Sets the value of a private/protected property of a class. |
|
| @@ 107-112 (lines=6) @@ | ||
| 104 | * @param string $property_name Property to set. |
|
| 105 | * @param mixed|null $value The new value. |
|
| 106 | */ |
|
| 107 | protected function setValue( $object, $property_name, $value ) { |
|
| 108 | $reflection = new \ReflectionClass( $classname ); |
|
| 109 | $property = $reflection->getProperty( $property_name ); |
|
| 110 | $property->setAccessible( true ); |
|
| 111 | $property->setValue( $object, $value ); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Retrieves the value of a private/protected property of a class. |
|
| @@ 122-128 (lines=7) @@ | ||
| 119 | * |
|
| 120 | * @return mixed |
|
| 121 | */ |
|
| 122 | protected function getStaticValue( $classname, $property_name ) { |
|
| 123 | $reflection = new \ReflectionClass( $classname ); |
|
| 124 | $property = $reflection->getProperty( $property_name ); |
|
| 125 | $property->setAccessible( true ); |
|
| 126 | ||
| 127 | return $property->getValue(); |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * Retrieves the value of a private/protected property of a class. |
|