From 34ee79302d2bcd2ec663d7e4922f2382264c74df Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Sat, 10 Aug 2019 10:30:33 +0200 Subject: [PATCH] s/function/static function for anonymous functions not relying on `$this` --- tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php b/tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php index 0b9ed303b..f3473a7b4 100644 --- a/tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php +++ b/tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php @@ -140,7 +140,7 @@ public function testGeneratesClass() : void ->expects(self::once()) ->method('__invoke') ->with($generatedClass) - ->will(self::returnCallback(function ($className) : bool { + ->will(self::returnCallback(static function ($className) : bool { eval('class ' . $className . ' {}'); return true; @@ -153,7 +153,7 @@ public function testGeneratesClass() : void ->expects(self::once()) ->method('generate') ->with( - self::callback(function (\ReflectionClass $reflectionClass) : bool { + self::callback(static function (\ReflectionClass $reflectionClass) : bool { return $reflectionClass->getName() === 'stdClass'; }), self::isInstanceOf(ClassGenerator::class), @@ -196,7 +196,7 @@ public function testGeneratesClassBasedOnGivenProxyOptions() : void $this ->proxyAutoloader ->method('__invoke') - ->will(self::returnCallback(function (string $className) : bool { + ->will(self::returnCallback(static function (string $className) : bool { eval('class ' . $className . ' {}'); return true;