its_resolveResource_delegates_to_expr_resolver()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace spec\Knp\RadBundle\Resource\Resolver;
4
5
use Prophecy\Argument;
6
use PhpSpec\ObjectBehavior;
7
8
class AggregateSpec extends ObjectBehavior
9
{
10
    /**
11
     * @param Knp\RadBundle\Resource\Resolver\ExpressionLanguageBased $exprBased
12
     * @param Knp\RadBundle\Resource\Resolver\OptionsBased $optionsBased
13
     * @param Symfony\Component\HttpFoundation\Request $request
0 ignored issues
show
Bug introduced by
There is no parameter named $request. Was it maybe removed?

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(...).

/**
 * @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.

Loading history...
14
     */
15
    function let($exprBased, $optionsBased)
16
    {
17
        $this->beConstructedWith($optionsBased, $exprBased);
18
    }
19
20
    function its_resolveResource_delegates_to_expr_resolver($request, $exprBased, $optionsBased)
0 ignored issues
show
Coding Style introduced by
Method name "AggregateSpec::its_resolveResource_delegates_to_expr_resolver" is not in camel caps format
Loading history...
21
    {
22
        $exprBased->resolveResource($request, array('expr' => ''))->shouldBeCalled();
23
        $optionsBased->resolveResource($request, Argument::any())->shouldNotBeCalled();
24
        $this->resolveResource($request, array('expr' => ''));
25
    }
26
27
    function its_resolveResource_delegates_to_options_resolver($request, $exprBased, $optionsBased)
0 ignored issues
show
Coding Style introduced by
Method name "AggregateSpec::its_resolveResource_delegates_to_options_resolver" is not in camel caps format
Loading history...
28
    {
29
        $optionsBased->resolveResource($request, array('service' => '', 'method', 'arguments' => array()))->shouldBeCalled();
30
        $exprBased->resolveResource($request, Argument::any())->shouldNotBeCalled();
31
        $this->resolveResource($request, array('service' => '', 'method', 'arguments' => array()));
32
    }
33
}
34