MethodOnRoutePattern   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 4
c 1
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 declare(strict_types=1);
2
3
/*
4
 * This file is part of Flight Routing.
5
 *
6
 * PHP version 8.0 and above required
7
 *
8
 * @author    Divine Niiquaye Ibok <[email protected]>
9
 * @copyright 2019 Divine Niiquaye Ibok (https://divinenii.com/)
10
 * @license   https://opensource.org/licenses/BSD-3-Clause License
11
 *
12
 * For the full copyright and license information, please view the LICENSE
13
 * file that was distributed with this source code.
14
 */
15
16
namespace Flight\Routing\Tests\Fixtures\Annotation\Route\Valid;
17
18
use Flight\Routing\Annotation\Route;
19
use JsonSerializable;
20
21
/**
22
 * @Route("testing/*<handleSomething>", methods={"GET", "HEAD"})
23
 */
24
class MethodOnRoutePattern implements JsonSerializable
25
{
26
    public function handleSomething(): JsonSerializable
27
    {
28
        return $this;
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    #[\ReturnTypeWillChange]
35
    public function jsonSerialize()
36
    {
37
        return ['Hello' => 'World to Flight Routing'];
38
    }
39
}
40