for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace spec\Knp\RadBundle\Resource\Resolver;
use Prophecy\Argument;
use PhpSpec\ObjectBehavior;
class AggregateSpec extends ObjectBehavior
{
/**
* @param Knp\RadBundle\Resource\Resolver\ExpressionLanguageBased $exprBased
* @param Knp\RadBundle\Resource\Resolver\OptionsBased $optionsBased
* @param Symfony\Component\HttpFoundation\Request $request
$request
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.
*/
function let($exprBased, $optionsBased)
$this->beConstructedWith($optionsBased, $exprBased);
}
function its_resolveResource_delegates_to_expr_resolver($request, $exprBased, $optionsBased)
$exprBased->resolveResource($request, array('expr' => ''))->shouldBeCalled();
$optionsBased->resolveResource($request, Argument::any())->shouldNotBeCalled();
$this->resolveResource($request, array('expr' => ''));
function its_resolveResource_delegates_to_options_resolver($request, $exprBased, $optionsBased)
$optionsBased->resolveResource($request, array('service' => '', 'method', 'arguments' => array()))->shouldBeCalled();
$exprBased->resolveResource($request, Argument::any())->shouldNotBeCalled();
$this->resolveResource($request, array('service' => '', 'method', 'arguments' => array()));
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.