Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS: imported symbols cleanups #220

Merged
merged 166 commits into from
Jan 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
eb4aeea
Removing useless spacing
Ocramius Jan 2, 2015
4861df0
Removing unused imports
Ocramius Jan 2, 2015
9fc869a
Removing useless spacing
Ocramius Jan 2, 2015
43c89a3
Removing unused imports
Ocramius Jan 2, 2015
9f5f5a3
Adding missing docblock parameters
Ocramius Jan 2, 2015
9a7e8c9
Adding missing docblock parameters
Ocramius Jan 2, 2015
8c36cb6
Adding missing docblock parameters
Ocramius Jan 2, 2015
e19b541
Adding missing docblock parameters
Ocramius Jan 2, 2015
44767da
Removing unused parameters
Ocramius Jan 2, 2015
23bac06
Removing unused parameters
Ocramius Jan 2, 2015
eee7559
Adding missing docblock parameters
Ocramius Jan 2, 2015
92ecbc1
Adding missing docblock parameters
Ocramius Jan 2, 2015
c049f1b
Adding missing docblock parameters
Ocramius Jan 2, 2015
42d2010
Adding missing docblock parameters
Ocramius Jan 2, 2015
53b8d6f
Removing unused IDE hint
Ocramius Jan 2, 2015
1ef52a5
Adding missing docblock parameters
Ocramius Jan 2, 2015
6ec47ef
Removing unused IDE hint
Ocramius Jan 2, 2015
453995a
Adding missing docblock parameters
Ocramius Jan 2, 2015
c12e9a2
Removing unused IDE hint
Ocramius Jan 2, 2015
5c6b28c
Adding missing docblock parameters
Ocramius Jan 2, 2015
d1bbfc3
Removing unused IDE hint
Ocramius Jan 2, 2015
e809346
Adding missing docblock parameters
Ocramius Jan 2, 2015
19b5d2b
Adding missing docblock parameters
Ocramius Jan 2, 2015
276ab57
Adding missing docblock parameters
Ocramius Jan 2, 2015
f7bc255
Adding missing docblock parameters
Ocramius Jan 2, 2015
b1cbaca
Adding missing docblock parameters
Ocramius Jan 2, 2015
9a72fae
Adding missing docblock parameters
Ocramius Jan 2, 2015
b782c7d
Removing unused IDE hint
Ocramius Jan 2, 2015
780fe04
Adding missing docblock parameters
Ocramius Jan 2, 2015
6935dea
Removing unused IDE hint
Ocramius Jan 2, 2015
8c1e296
Adding missing docblock parameters
Ocramius Jan 2, 2015
ac6f27f
Removing unused IDE hint
Ocramius Jan 2, 2015
72fdcdd
Adding missing docblock parameters
Ocramius Jan 2, 2015
5d24e98
Removing unused IDE hint
Ocramius Jan 2, 2015
36803c3
Adding missing docblock parameters
Ocramius Jan 2, 2015
33b8b88
Adding missing docblock parameters
Ocramius Jan 2, 2015
f7c614a
Adding missing docblock parameters
Ocramius Jan 2, 2015
9005eb6
Adding missing docblock parameters
Ocramius Jan 2, 2015
e79526b
Adding missing docblock parameters
Ocramius Jan 2, 2015
f35fb58
Adding missing docblock parameters
Ocramius Jan 2, 2015
faf7b3b
Removing unused IDE hint
Ocramius Jan 2, 2015
916d8eb
Adding missing docblock parameters
Ocramius Jan 2, 2015
0e4bfd9
Removing unused IDE hint
Ocramius Jan 2, 2015
e89f2b0
Adding missing docblock parameters
Ocramius Jan 2, 2015
8735ccb
Adding missing docblock parameters
Ocramius Jan 2, 2015
3871683
Removing unused IDE hint
Ocramius Jan 2, 2015
0aa300d
Removing unused parameter `$instance`
Ocramius Jan 2, 2015
5c1506f
Removing useless parameters/assertions
Ocramius Jan 2, 2015
2af7ad0
Adding missing docblock parameters
Ocramius Jan 2, 2015
027ca1d
Adding missing docblock parameters
Ocramius Jan 2, 2015
6de49b0
Adding missing docblock parameters
Ocramius Jan 2, 2015
9e1f441
Adding missing docblock parameters
Ocramius Jan 2, 2015
6afd807
Adding missing docblock parameters
Ocramius Jan 2, 2015
6acb33f
Adding missing docblock parameters
Ocramius Jan 2, 2015
2af074f
Removing unused IDE hint
Ocramius Jan 2, 2015
85f97a7
Adding missing docblock parameters
Ocramius Jan 2, 2015
a81a265
Adding missing docblock parameters
Ocramius Jan 2, 2015
af32c84
Adding missing docblock parameters
Ocramius Jan 2, 2015
54ab6e1
Adding missing docblock parameters
Ocramius Jan 2, 2015
3d97433
Removing unused IDE hint
Ocramius Jan 2, 2015
e937ddc
Removing unused IDE hint
Ocramius Jan 2, 2015
d2a6acc
Removing unused IDE hint
Ocramius Jan 2, 2015
8c5a456
Removing unused IDE hint
Ocramius Jan 2, 2015
5d4b3e9
Removing wrong IDE hints
Ocramius Jan 2, 2015
4fce134
Adding missing docblock parameters
Ocramius Jan 2, 2015
621a70a
Adding missing docblock parameters
Ocramius Jan 2, 2015
670ada2
Adding missing docblock parameters
Ocramius Jan 2, 2015
860cd4d
Adding missing docblock parameters
Ocramius Jan 2, 2015
f7d9950
Adding missing docblock parameters
Ocramius Jan 2, 2015
116cd29
Adding missing docblock parameters
Ocramius Jan 2, 2015
4bdfe56
Adding missing docblock parameters
Ocramius Jan 2, 2015
f49f50c
Adding missing docblock parameters
Ocramius Jan 2, 2015
ed1d24f
Adding missing docblock parameters
Ocramius Jan 2, 2015
715444a
Adding missing docblock parameters
Ocramius Jan 2, 2015
fc9cd70
Adding missing docblock parameters
Ocramius Jan 2, 2015
e214474
Removing unused IDE hint
Ocramius Jan 2, 2015
6df3ca2
Removing unused IDE hint
Ocramius Jan 2, 2015
b64915d
Removing unused IDE hint
Ocramius Jan 2, 2015
e9057df
Removing unused IDE hint
Ocramius Jan 2, 2015
596cea1
Removing unused IDE hint
Ocramius Jan 2, 2015
b9b9505
Removing wrong IDE hints
Ocramius Jan 2, 2015
79519b5
Making type-hints explicit
Ocramius Jan 2, 2015
f7c9675
Making type-hints explicit
Ocramius Jan 2, 2015
22276c9
Making type-hints explicit
Ocramius Jan 2, 2015
b431a1a
Making type-hints explicit
Ocramius Jan 2, 2015
964d0ec
Adding missing docblock parameters
Ocramius Jan 2, 2015
dcb8ec6
Adding missing docblock parameters
Ocramius Jan 2, 2015
1ffefbe
Adding missing docblock parameters
Ocramius Jan 2, 2015
3302ee6
Adding missing docblock parameters
Ocramius Jan 2, 2015
25596e0
s/$instanceOrClassname/$instanceOrClassName
Ocramius Jan 2, 2015
6074a00
Making type-hints explicit
Ocramius Jan 2, 2015
bfecbb4
Providing IDE hints for mocks
Ocramius Jan 2, 2015
e0cb8d0
Providing IDE hints for mocks
Ocramius Jan 2, 2015
7f4d2e6
Providing IDE hints for mocks
Ocramius Jan 2, 2015
b285f7c
Providing IDE hints for mocks
Ocramius Jan 2, 2015
00b5dbd
Providing IDE hints for mocks
Ocramius Jan 2, 2015
0f08d8c
Providing IDE hints for mocks
Ocramius Jan 2, 2015
5fb0f7b
Providing IDE hints for mocks
Ocramius Jan 2, 2015
613576b
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6cfda84
Providing IDE hints for mocks
Ocramius Jan 2, 2015
518dfd6
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6cad8f8
Providing IDE hints for mocks
Ocramius Jan 2, 2015
2b5a39b
Providing IDE hints for mocks
Ocramius Jan 2, 2015
4f93e98
Providing IDE hints for mocks
Ocramius Jan 2, 2015
41fdd8a
Providing IDE hints for mocks
Ocramius Jan 2, 2015
0dfb444
Providing IDE hints for mocks
Ocramius Jan 2, 2015
ee524c2
Providing IDE hints for mocks
Ocramius Jan 2, 2015
64031b1
Providing IDE hints for mocks
Ocramius Jan 2, 2015
411a94d
Providing IDE hints for mocks
Ocramius Jan 2, 2015
a83bf81
Providing IDE hints for mocks
Ocramius Jan 2, 2015
4fa18d9
Providing IDE hints for mocks
Ocramius Jan 2, 2015
0dd428c
Providing IDE hints for mocks
Ocramius Jan 2, 2015
bd2e242
Providing IDE hints for mocks
Ocramius Jan 2, 2015
a22c2d4
Providing IDE hints for mocks
Ocramius Jan 2, 2015
83ecbce
Providing IDE hints for mocks
Ocramius Jan 2, 2015
646cb21
Providing IDE hints for mocks
Ocramius Jan 2, 2015
2b19e00
Providing IDE hints for mocks
Ocramius Jan 2, 2015
e73a1dd
Providing IDE hints for mocks
Ocramius Jan 2, 2015
3f814fe
Providing IDE hints for mocks
Ocramius Jan 2, 2015
d2a6f32
Providing IDE hints for mocks
Ocramius Jan 2, 2015
cfa9de2
Providing IDE hints for mocks
Ocramius Jan 2, 2015
1485a7e
Providing IDE hints for mocks
Ocramius Jan 2, 2015
bad3039
Providing IDE hints for mocks
Ocramius Jan 2, 2015
bd1099c
Providing IDE hints for mocks
Ocramius Jan 2, 2015
f323cac
Providing IDE hints for mocks
Ocramius Jan 2, 2015
f475da0
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6bb5e22
Providing IDE hints for mocks
Ocramius Jan 2, 2015
e0c8889
Providing IDE hints for mocks
Ocramius Jan 2, 2015
c3649a7
Providing IDE hints for mocks
Ocramius Jan 2, 2015
59f6172
Providing IDE hints for mocks
Ocramius Jan 2, 2015
5e56b83
Providing IDE hints for mocks
Ocramius Jan 2, 2015
014b713
Providing IDE hints for mocks
Ocramius Jan 2, 2015
53c870f
Providing IDE hints for mocks
Ocramius Jan 2, 2015
58b413c
Providing IDE hints for mocks
Ocramius Jan 2, 2015
10821b2
Providing IDE hints for mocks
Ocramius Jan 2, 2015
391ba26
Providing IDE hints for mocks
Ocramius Jan 2, 2015
38d926f
Providing IDE hints for mocks
Ocramius Jan 2, 2015
204c0d4
Providing IDE hints for mocks
Ocramius Jan 2, 2015
3aab42b
Providing IDE hints for mocks
Ocramius Jan 2, 2015
59e023f
Providing IDE hints for mocks
Ocramius Jan 2, 2015
dd0360e
Providing IDE hints for mocks
Ocramius Jan 2, 2015
a047471
Providing IDE hints for mocks
Ocramius Jan 2, 2015
edf0d69
Providing IDE hints for mocks
Ocramius Jan 2, 2015
7a9c720
Providing IDE hints for mocks
Ocramius Jan 2, 2015
35f7a4f
Providing IDE hints for mocks
Ocramius Jan 2, 2015
1050e71
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6084296
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6d91708
Providing IDE hints for mocks
Ocramius Jan 2, 2015
b3fa07e
Providing IDE hints for mocks
Ocramius Jan 2, 2015
c854f27
Providing IDE hints for mocks
Ocramius Jan 2, 2015
4ad0792
Providing IDE hints for mocks
Ocramius Jan 2, 2015
bcb41f0
Providing IDE hints for mocks
Ocramius Jan 2, 2015
ddf2ac3
Providing IDE hints for mocks
Ocramius Jan 2, 2015
2cedf0f
Providing IDE hints for mocks
Ocramius Jan 2, 2015
0e6f147
Class over string reference
Ocramius Jan 2, 2015
300faa1
Providing IDE hints for mocks
Ocramius Jan 2, 2015
6b68f16
Correcting IDE hints (missing types)
Ocramius Jan 2, 2015
bb9c48a
Removing unused import
Ocramius Jan 2, 2015
cd49ced
Removing unused import
Ocramius Jan 2, 2015
15ddbb1
Optimized imports
Ocramius Jan 2, 2015
c3a04ef
Optimized imports
Ocramius Jan 2, 2015
4a88198
Optimized imports
Ocramius Jan 2, 2015
5a38cce
Optimized imports
Ocramius Jan 2, 2015
c452b58
Optimized imports
Ocramius Jan 2, 2015
bfd5ac9
Importing referenced return types
Ocramius Jan 2, 2015
3223930
Removing useless spacing
Ocramius Jan 2, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ProxyManager/Factory/LazyLoadingGhostFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

namespace ProxyManager\Factory;

use ProxyManager\Proxy\GhostObjectInterface;
use ProxyManager\ProxyGenerator\LazyLoadingGhostGenerator;

/**
Expand All @@ -26,7 +27,7 @@
* @author Marco Pivetta <ocramius@gmail.com>
* @license MIT
*
* @method \ProxyManager\Proxy\GhostObjectInterface createProxy($className, \Closure $initializer)
* @method GhostObjectInterface createProxy($className, \Closure $initializer)
*/
class LazyLoadingGhostFactory extends AbstractLazyFactory
{
Expand Down
3 changes: 2 additions & 1 deletion src/ProxyManager/Factory/LazyLoadingValueHolderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

namespace ProxyManager\Factory;

use ProxyManager\Proxy\VirtualProxyInterface;
use ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator;

/**
Expand All @@ -26,7 +27,7 @@
* @author Marco Pivetta <ocramius@gmail.com>
* @license MIT
*
* @method \ProxyManager\Proxy\VirtualProxyInterface createProxy($className, \Closure $initializer)
* @method VirtualProxyInterface createProxy($className, \Closure $initializer)
*/
class LazyLoadingValueHolderFactory extends AbstractLazyFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use PHPUnit_Framework_TestCase;
use ProxyManager\Factory\RemoteObject\Adapter\JsonRpc;
use Zend\Server\Client;

/**
* Tests for {@see \ProxyManager\Factory\RemoteObject\Adapter\JsonRpc}
Expand All @@ -39,10 +40,8 @@ class JsonRpcTest extends PHPUnit_Framework_TestCase
*/
public function testCanBuildAdapterWithJsonRpcClient()
{
$client = $this
->getMockBuilder('Zend\Server\Client')
->setMethods(['call'])
->getMock();
/* @var $client Client|\PHPUnit_Framework_MockObject_MockObject */
$client = $this->getMock(Client::class, ['call']);

$adapter = new JsonRpc($client);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use PHPUnit_Framework_TestCase;
use ProxyManager\Factory\RemoteObject\Adapter\Soap;
use Zend\Server\Client;

/**
* Tests for {@see \ProxyManager\Factory\RemoteObject\Adapter\Soap}
Expand All @@ -39,10 +40,8 @@ class SoapTest extends PHPUnit_Framework_TestCase
*/
public function testCanBuildAdapterWithSoapRpcClient()
{
$client = $this
->getMockBuilder('Zend\Server\Client')
->setMethods(['call'])
->getMock();
/* @var $client Client|\PHPUnit_Framework_MockObject_MockObject */
$client = $this->getMock(Client::class, ['call']);

$adapter = new Soap($client);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use PHPUnit_Framework_TestCase;
use ProxyManager\Factory\RemoteObject\Adapter\XmlRpc;
use Zend\Server\Client;

/**
* Tests for {@see \ProxyManager\Factory\RemoteObject\Adapter\XmlRpc}
Expand All @@ -39,10 +40,8 @@ class XmlRpcTest extends PHPUnit_Framework_TestCase
*/
public function testCanBuildAdapterWithXmlRpcClient()
{
$client = $this
->getMockBuilder('Zend\Server\Client')
->setMethods(['call'])
->getMock();
/* @var $client Client|\PHPUnit_Framework_MockObject_MockObject */
$client = $this->getMock(Client::class, ['call']);

$adapter = new XmlRpc($client);

Expand Down
10 changes: 7 additions & 3 deletions tests/ProxyManagerTest/Factory/RemoteObjectFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
use PHPUnit_Framework_TestCase;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\RemoteObject\AdapterInterface;
use ProxyManager\Factory\RemoteObjectFactory;
use ProxyManager\Generator\ClassGenerator;
use ProxyManager\Generator\Util\UniqueIdentifierGenerator;
use ProxyManager\GeneratorStrategy\GeneratorStrategyInterface;
use ProxyManager\Inflector\ClassNameInflectorInterface;
use ProxyManager\Signature\ClassSignatureGeneratorInterface;
use ProxyManager\Signature\SignatureCheckerInterface;
Expand Down Expand Up @@ -105,7 +107,8 @@ public function testWillSkipAutoGeneration()
->with(BaseInterface::class)
->will($this->returnValue(RemoteObjectMock::class));

$adapter = $this->getMock('ProxyManager\Factory\RemoteObject\AdapterInterface');
/* @var $adapter AdapterInterface|\PHPUnit_Framework_MockObject_MockObject */
$adapter = $this->getMock(AdapterInterface::class);
$factory = new RemoteObjectFactory($adapter, $this->config);
/* @var $proxy \stdClass */
$proxy = $factory->createProxy(BaseInterface::class, $adapter);
Expand All @@ -125,7 +128,7 @@ public function testWillSkipAutoGeneration()
public function testWillTryAutoGeneration()
{
$proxyClassName = UniqueIdentifierGenerator::getIdentifier('bar');
$generator = $this->getMock('ProxyManager\GeneratorStrategy\\GeneratorStrategyInterface');
$generator = $this->getMock(GeneratorStrategyInterface::class);
$autoloader = $this->getMock(AutoloaderInterface::class);

$this->config->expects($this->any())->method('getGeneratorStrategy')->will($this->returnValue($generator));
Expand Down Expand Up @@ -176,7 +179,8 @@ function () use ($proxyClassName) {
$this->signatureChecker->expects($this->atLeastOnce())->method('checkSignature');
$this->classSignatureGenerator->expects($this->once())->method('addSignature')->will($this->returnArgument(0));

$adapter = $this->getMock('ProxyManager\Factory\RemoteObject\AdapterInterface');
/* @var $adapter AdapterInterface */
$adapter = $this->getMock(AdapterInterface::class);
$factory = new RemoteObjectFactory($adapter, $this->config);
$proxy = $factory->createProxy(BaseInterface::class, $adapter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,18 @@ class AccessInterceptorScopeLocalizerFunctionalTest extends PHPUnit_Framework_Te
{
/**
* @dataProvider getProxyMethods
*
* @param string $className
* @param object $instance
* @param string $method
* @param mixed[] $params
* @param mixed $expectedValue
*/
public function testMethodCalls($className, $instance, $method, $params, $expectedValue)
public function testMethodCalls($className, $instance, $method, array $params, $expectedValue)
{
$proxyName = $this->generateProxy($className);

/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
/* @var $proxy AccessInterceptorInterface */
$proxy = $proxyName::staticProxyConstructor($instance);

$this->assertProxySynchronized($instance, $proxy);
Expand Down Expand Up @@ -91,12 +97,18 @@ function ($proxy, $instance, $method, $params, & $returnEarly) use ($random) {

/**
* @dataProvider getProxyMethods
*
* @param string $className
* @param object $instance
* @param string $method
* @param mixed[] $params
* @param mixed $expectedValue
*/
public function testMethodCallsWithSuffixListener($className, $instance, $method, $params, $expectedValue)
public function testMethodCallsWithSuffixListener($className, $instance, $method, array $params, $expectedValue)
{
$proxyName = $this->generateProxy($className);

/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
/* @var $proxy AccessInterceptorInterface */
$proxy = $proxyName::staticProxyConstructor($instance);
/* @var $listener callable|\PHPUnit_Framework_MockObject_MockObject */
$listener = $this->getMock(stdClass::class, ['__invoke']);
Expand Down Expand Up @@ -131,11 +143,17 @@ function ($proxy, $instance, $method, $params, $returnValue, & $returnEarly) use

/**
* @dataProvider getProxyMethods
*
* @param string $className
* @param object $instance
* @param string $method
* @param mixed[] $params
* @param mixed $expectedValue
*/
public function testMethodCallsAfterUnSerialization($className, $instance, $method, $params, $expectedValue)
public function testMethodCallsAfterUnSerialization($className, $instance, $method, array $params, $expectedValue)
{
$proxyName = $this->generateProxy($className);
/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
/* @var $proxy AccessInterceptorInterface */
$proxy = unserialize(serialize($proxyName::staticProxyConstructor($instance)));

$this->assertSame($expectedValue, call_user_func_array([$proxy, $method], $params));
Expand All @@ -144,12 +162,18 @@ public function testMethodCallsAfterUnSerialization($className, $instance, $meth

/**
* @dataProvider getProxyMethods
*
* @param string $className
* @param object $instance
* @param string $method
* @param mixed[] $params
* @param mixed $expectedValue
*/
public function testMethodCallsAfterCloning($className, $instance, $method, $params, $expectedValue)
public function testMethodCallsAfterCloning($className, $instance, $method, array $params, $expectedValue)
{
$proxyName = $this->generateProxy($className);

/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
/* @var $proxy AccessInterceptorInterface */
$proxy = $proxyName::staticProxyConstructor($instance);
$cloned = clone $proxy;

Expand All @@ -160,20 +184,31 @@ public function testMethodCallsAfterCloning($className, $instance, $method, $par

/**
* @dataProvider getPropertyAccessProxies
*
* @param object $instance
* @param AccessInterceptorInterface $proxy
* @param string $publicProperty
* @param mixed $propertyValue
*/
public function testPropertyReadAccess($instance, $proxy, $publicProperty, $propertyValue)
{
/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
public function testPropertyReadAccess(
$instance,
AccessInterceptorInterface $proxy,
$publicProperty,
$propertyValue
) {
$this->assertSame($propertyValue, $proxy->$publicProperty);
$this->assertProxySynchronized($instance, $proxy);
}

/**
* @dataProvider getPropertyAccessProxies
*
* @param object $instance
* @param AccessInterceptorInterface $proxy
* @param string $publicProperty
*/
public function testPropertyWriteAccess($instance, $proxy, $publicProperty)
public function testPropertyWriteAccess($instance, AccessInterceptorInterface $proxy, $publicProperty)
{
/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
$newValue = uniqid();
$proxy->$publicProperty = $newValue;

Expand All @@ -183,10 +218,13 @@ public function testPropertyWriteAccess($instance, $proxy, $publicProperty)

/**
* @dataProvider getPropertyAccessProxies
*
* @param object $instance
* @param AccessInterceptorInterface $proxy
* @param string $publicProperty
*/
public function testPropertyExistence($instance, $proxy, $publicProperty)
public function testPropertyExistence($instance, AccessInterceptorInterface $proxy, $publicProperty)
{
/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
$this->assertSame(isset($instance->$publicProperty), isset($proxy->$publicProperty));
$this->assertProxySynchronized($instance, $proxy);

Expand All @@ -197,11 +235,14 @@ public function testPropertyExistence($instance, $proxy, $publicProperty)

/**
* @dataProvider getPropertyAccessProxies
*
* @param object $instance
* @param AccessInterceptorInterface $proxy
* @param string $publicProperty
*/
public function testPropertyUnset($instance, $proxy, $publicProperty)
public function testPropertyUnset($instance, AccessInterceptorInterface $proxy, $publicProperty)
{
$this->markTestSkipped('It is currently not possible to synchronize properties un-setting');
/* @var $proxy \ProxyManager\Proxy\AccessInterceptorInterface */
unset($proxy->$publicProperty);

$this->assertFalse(isset($instance->$publicProperty));
Expand All @@ -217,7 +258,7 @@ public function testCanWriteToArrayKeysInPublicProperty()
$instance = new ClassWithPublicArrayProperty();
$className = get_class($instance);
$proxyName = $this->generateProxy($className);
/* @var $proxy ClassWithPublicArrayProperty */
/* @var $proxy ClassWithPublicArrayProperty|AccessInterceptorInterface */
$proxy = $proxyName::staticProxyConstructor($instance);

$proxy->arrayProperty['foo'] = 'bar';
Expand All @@ -238,7 +279,7 @@ public function testWillNotModifyRetrievedPublicProperties()
$instance = new ClassWithPublicProperties();
$className = get_class($instance);
$proxyName = $this->generateProxy($className);
/* @var $proxy ClassWithPublicProperties||AccessInterceptorInterface */
/* @var $proxy ClassWithPublicProperties|AccessInterceptorInterface */
$proxy = $proxyName::staticProxyConstructor($instance);
$variable = $proxy->property0;

Expand Down
Loading