| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function create($originalObject) |
||
| 43 | { |
||
| 44 | $proxyClass = $this->proxyFactory->createProxy(get_class($originalObject)); |
||
| 45 | $rc = new \ReflectionClass($proxyClass); |
||
| 46 | $pool = $rc->newInstanceWithoutConstructor(); |
||
| 47 | |||
| 48 | // Copy properties from original pool to new |
||
| 49 | foreach (NSA::getProperties($originalObject) as $property) { |
||
| 50 | NSA::setProperty($pool, $property, NSA::getProperty($originalObject, $property)); |
||
| 51 | } |
||
| 52 | |||
| 53 | return $pool; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |