diff --git a/src/ProxyManager/ProxyGenerator/RemoteObject/MethodGenerator/Constructor.php b/src/ProxyManager/ProxyGenerator/RemoteObject/MethodGenerator/Constructor.php deleted file mode 100644 index d1fcb8926..000000000 --- a/src/ProxyManager/ProxyGenerator/RemoteObject/MethodGenerator/Constructor.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @license MIT - */ -class Constructor extends MethodGenerator -{ - /** - * Constructor - * - * @param ReflectionClass $originalClass Reflection of the class to proxy - * @param PropertyGenerator $adapter Adapter property - */ - public function __construct(ReflectionClass $originalClass, PropertyGenerator $adapter) - { - parent::__construct('__construct'); - - $adapterName = $adapter->getName(); - - $this->setParameter(new ParameterGenerator($adapterName, 'ProxyManager\Factory\RemoteObject\AdapterInterface')); - - $this->setDocblock( - '@override constructor for remote object control\n\n' - . '@param \\ProxyManager\\Factory\\RemoteObject\\AdapterInterface \$adapter' - ); - - $body = '$this->' . $adapterName . ' = $' . $adapterName . ';'; - - foreach ($originalClass->getProperties() as $property) { - if ($property->isPublic() && ! $property->isStatic()) { - $body .= "\nunset(\$this->" . $property->getName() . ');'; - } - } - - $this->setBody($body); - } -}