Skip to content

Commit

Permalink
s/function/static function for anonymous functions not relying on `$t…
Browse files Browse the repository at this point in the history
…his`
  • Loading branch information
Ocramius committed Aug 10, 2019
1 parent 95639be commit 34ee793
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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),
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 34ee793

Please sign in to comment.