for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Bone\Firewall;
use Barnacle\Container;
use Barnacle\RegistrationInterface;
use Bone\Http\Middleware\Stack;
use Bone\Http\MiddlewareAwareInterface;
class FirewallPackage implements RegistrationInterface, MiddlewareAwareInterface
{
/**
* @param Container $c
*/
public function addToContainer(Container $c)
$firewall = new RouteFirewall($c);
$c[RouteFirewall::class] = $firewall;
}
* @param Stack $stack
* @param Container $container
$container
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function addMiddleware(Stack $stack, Container $c): void
$firewall = $c->get(RouteFirewall::class);
$stack->addMiddleWare($firewall);
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.