Passed
Pull Request — master (#439)
by
unknown
06:58
created

HomeController::attribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Router\App\Controller;
13
14
use Spiral\Router\Annotation\Route;
15
16
class HomeController
17
{
18
    /**
19
     * @Route(route="/", name="index", methods="GET")
20
     */
21
    public function index()
22
    {
23
        return 'index';
24
    }
25
26
    /**
27
     * @Route(route="/", name="method", methods="POST")
28
     */
29
    public function method()
30
    {
31
        return 'method';
32
    }
33
34
    #[Route(route: '/attribute', name: 'attribute', methods: 'GET', group: 'test')]
35
    public function attribute()
36
    {
37
        return 'attribute';
38
    }
39
}
40