PHP code example of shipmonk / dead-code-detector
1. Go to this page and download the library: Download shipmonk/dead-code-detector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shipmonk / dead-code-detector example snippets
use ReflectionMethod;
use ShipMonk\PHPStan\DeadCode\Provider\SimpleMethodEntrypointProvider;
class ApiOutputEntrypointProvider extends SimpleMethodEntrypointProvider
{
public function isEntrypointMethod(ReflectionMethod $method): bool
{
return $method->getDeclaringClass()->implementsInterface(ApiOutput::class));
}
}