Bug in psalm annotation or in readme
vjik opened this issue · 6 comments
vjik commented
Here returned boolean value:
@psalm-param Closure(
RealObjectType|null=,
RealObjectType&ValueHolderInterface<RealObjectType>&VirtualProxyInterface=,
string=,
array<string, mixed>=,
?Closure=
) : bool $initializer
In readme $initializer
doesn't return anything:
$factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory();
$proxy = $factory->createProxy(
\MyApp\HeavyComplexObject::class,
function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) {
$wrappedObject = new \MyApp\HeavyComplexObject(); // instantiation logic here
$initializer = null; // turning off further lazy initialization
}
);
Ocramius commented
Yes, I mean, can you send a patch for https://github.com/Ocramius/ProxyManager/tree/b19ebfd0d849857cfdface555e00ea2ba2109185#proxy-example ? :D
vjik commented
I don't know how to right :(
Need with return or need w/o return.
Ocramius commented
The correct notation is **with** return
…On Tue, 3 Aug 2021, 09:07 Sergei Predvoditelev, ***@***.***> wrote:
I don't know how to right :(
Need with return or need w/o return.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#713 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABFVEEQWKB6B4ZL4ZR44ULT26IT7ANCNFSM5BNIIT2Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.