Passed
Push — main ( 3a9c9f...17fbbc )
by Chema
09:55 queued 07:39
created

FakeController::floatParamAction()   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 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Unit\Router;
6
7
final class FakeController
8
{
9
    public function basicAction(): string
10
    {
11
        return 'Expected!';
12
    }
13
14
    public function stringParamAction(string $param): string
15
    {
16
        $type = get_debug_type($param);
17
        return "The '{$type}' param is '{$param}'!";
18
    }
19
20
    public function intParamAction(int $param): string
21
    {
22
        $type = get_debug_type($param);
23
        return "The '{$type}' param is '{$param}'!";
24
    }
25
26
    public function floatParamAction(float $param): string
27
    {
28
        $type = get_debug_type($param);
29
        return "The '{$type}' param is '{$param}'!";
30
    }
31
32
    public function boolParamAction(bool $param): string
33
    {
34
        $type = get_debug_type($param);
35
        $stringParam = json_encode($param);
36
        return "The '{$type}' param is '{$stringParam}'!";
37
    }
38
39
    public function manyParamsAction(string $firstParam, string $secondParam, string $thirdParam): string
40
    {
41
        return "The params are '{$firstParam}', '{$secondParam}' and '{$thirdParam}'!";
42
    }
43
}
44