Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | if (PHP_VERSION_ID >= 80400) { |
| 3 | eval(' |
| 4 | namespace Apie\Fixtures\Php84; |
| 5 | |
| 6 | class PropertyHooks |
| 7 | { |
| 8 | public string $name { |
| 9 | set { |
| 10 | if (strlen($value) === 0) { |
| 11 | throw new \ValueError("Name must be non-empty"); |
| 12 | } |
| 13 | $this->name = $value; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | public string $virtualSetter { |
| 18 | set(string $value) { |
| 19 | $this->name = ucfirst($value); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | public string $virtual { |
| 24 | get { |
| 25 | return "This is an example"; |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | public function __construct(string $name) { |
| 30 | $this->name = $name; |
| 31 | } |
| 32 | }'); |
| 33 | } |