Test Failed
Branch master (4153a4)
by Divine Niiquaye
13:02
created

DefaultValueController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 28
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A action() 0 2 1
A notAccessed() 0 2 1
A hello() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Flight Routing.
7
 *
8
 * PHP version 7.4 and above required
9
 *
10
 * @author    Divine Niiquaye Ibok <[email protected]>
11
 * @copyright 2019 Biurad Group (https://biurad.com/)
12
 * @license   https://opensource.org/licenses/BSD-3-Clause License
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
18
namespace Flight\Routing\Tests\Fixtures\Annotation\Route\Valid;
19
20
use Flight\Routing\Annotation\Route;
21
22
class DefaultValueController
23
{
24
    /**
25
     * @Route("/{default}/path", methods={"GET", "POST"}, name="action")
26
     */
27
    public function action($default = 'value'): void
0 ignored issues
show
Unused Code introduced by
The parameter $default is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

27
    public function action(/** @scrutinizer ignore-unused */ $default = 'value'): void

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

Loading history...
28
    {
29
    }
30
31
    /**
32
     * @Route(
33
     *     "/hello/{name:\w+}",
34
     *     methods={"GET", "POST"},
35
     *     name="hello_without_default"
36
     * )
37
     * @Route(
38
     *     "/cool/{name=<Symfony>}",
39
     *     where={"name": "\w+"},
40
     *     methods={"GET", "POST"},
41
     *     name="hello_with_default"
42
     * )
43
     */
44
    public function hello(string $name = 'World'): void
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

44
    public function hello(/** @scrutinizer ignore-unused */ string $name = 'World'): void

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

Loading history...
45
    {
46
    }
47
48
    private function notAccessed(): void
0 ignored issues
show
Unused Code introduced by
The method notAccessed() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
49
    {
50
    }
51
}
52