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

MethodOnRoutePattern   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handleSomething() 0 3 1
A jsonSerialize() 0 4 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
use JsonSerializable;
22
23
/**
24
 * @Route("testing/*<handleSomething>", methods={"GET", "HEAD"})
25
 */
26
class MethodOnRoutePattern implements JsonSerializable
27
{
28
    public function handleSomething(): JsonSerializable
29
    {
30
        return $this;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    #[\ReturnTypeWillChange]
37
    public function jsonSerialize()
38
    {
39
        return ['Hello' => 'World to Flight Routing'];
40
    }
41
}
42