| Total Complexity | 9 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | abstract class ObjectProxy |
||
| 6 | { |
||
| 7 | use ProxyTrait; |
||
| 8 | |||
| 9 | private object $instance; |
||
| 10 | |||
| 11 | public function __construct(object $instance) |
||
| 14 | } |
||
| 15 | |||
| 16 | protected function call(string $methodName, array $arguments) |
||
| 30 | } |
||
| 31 | |||
| 32 | abstract protected function executeMethodProxy(string $methodName, array $arguments, $result, float $timeStart); |
||
| 33 | |||
| 34 | protected function getNewStaticInstance(object $instance): self |
||
| 35 | { |
||
| 36 | return new static($instance); |
||
| 37 | } |
||
| 38 | |||
| 39 | protected function getInstance(): object |
||
| 40 | { |
||
| 41 | return $this->instance; |
||
| 42 | } |
||
| 43 | |||
| 44 | private function callInternal(string $methodName, array $arguments) |
||
| 45 | { |
||
| 46 | return $this->instance->$methodName(...$arguments); |
||
| 47 | } |
||
| 48 | |||
| 49 | private function processResult($result) |
||
| 56 | } |
||
| 57 | } |
||
| 58 |