Route::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the FOSRestBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\RestBundle\Controller\Annotations;
13
14
use Symfony\Component\Routing\Annotation\Route as BaseRoute;
15
16
/**
17
 * Route annotation class.
18
 *
19
 * @Annotation
20
 */
21
class Route extends BaseRoute
22
{
23 14
    public function __construct(array $data)
24
    {
25 14
        parent::__construct($data);
26
27 14
        if (!$this->getMethods()) {
28 14
            $this->setMethods((array) $this->getMethod());
29
        }
30 14
    }
31
32
    /**
33
     * @return string|null
34
     */
35
    public function getMethod()
36
    {
37
        return;
38
    }
39
}
40