| @@ 39-45 (lines=7) @@ | ||
| 36 | return null; |
|
| 37 | } |
|
| 38 | ||
| 39 | private function buildGetExpression(): Node\Stmt\If_ |
|
| 40 | { |
|
| 41 | $resolved = Expressions::resolveMethodCall('this', $this->resolverProperty, $this->resolveMethod); |
|
| 42 | $stmt = new Node\Stmt\Return_(new Node\Expr\PropertyFetch($resolved, '{$name}')); |
|
| 43 | ||
| 44 | return Expressions::throwExceptionOnNull($resolved, $stmt); |
|
| 45 | } |
|
| 46 | } |
|
| @@ 39-50 (lines=12) @@ | ||
| 36 | return null; |
|
| 37 | } |
|
| 38 | ||
| 39 | private function buildSetExpression(): Node\Stmt\If_ |
|
| 40 | { |
|
| 41 | $resolved = Expressions::resolveMethodCall('this', $this->resolverProperty, $this->resolveMethod); |
|
| 42 | $stmt = new Node\Stmt\Expression( |
|
| 43 | new Node\Expr\Assign( |
|
| 44 | new Node\Expr\PropertyFetch($resolved, '{$name}'), |
|
| 45 | new Node\Expr\Variable('value') |
|
| 46 | ) |
|
| 47 | ); |
|
| 48 | ||
| 49 | return Expressions::throwExceptionOnNull($resolved, $stmt); |
|
| 50 | } |
|
| 51 | } |
|