From 496403cc03a15e3a2ef5c4c1b1084c9a995b232e Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 20 Dec 2014 23:24:39 +0100 Subject: [PATCH] Removing unused method generator (constructor not required as of #115 and #175) --- .../MethodGenerator/Constructor.php | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/ProxyManager/ProxyGenerator/RemoteObject/MethodGenerator/Constructor.php 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); - } -}