for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace StaticAnalysis\LazyLoadingGhostObject;
use ProxyManager\Factory\LazyLoadingGhostFactory;
use ProxyManager\Proxy\LazyLoadingInterface;
require_once __DIR__ . '/../../vendor/autoload.php';
class MyProxiedClass
{
public function sayHello() : string
return 'Hello!';
}
echo (new LazyLoadingGhostFactory())
->createProxy(
MyProxiedClass::class,
static function (
?object & $instance,
LazyLoadingInterface $proxy,
string $method,
array $parameters,
?\Closure & $initializer,
array $properties
$properties
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
) : bool {
$initializer = null; // disable initialization
return true;
)
->sayHello();
$lazyLoadingGhost = (new LazyLoadingGhostFactory())
static function () : bool {
);
$lazyLoadingGhost->setProxyInitializer(static function (
});
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.