FooController::foobarAction()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\RestETagBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\RestETagBundle\Tests\Functional\Foo\Controller;
10
11
use Symfony\Component\HttpFoundation\Request;
12
use Symfony\Component\HttpFoundation\Response;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class FooController
18
{
19
    /**
20
     * @var bool
21
     */
22
    private $invoked = false;
23
24
    /**
25
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
26
     * @param Request $request
27
     *
28
     * @return array
29
     */
30
    public function foobarAction(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        if ($this->invoked) {
33
            throw new \LogicException;
34
        }
35
        $this->invoked = true;
36
37
        return new Response();
38
    }
39
}
40