Passed
Push — main ( 565e18...f372ec )
by Chema
55s queued 13s
created

Request   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 8
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInt() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpLightning\Router;
6
7
final class Request
8
{
9
    /**
10
     * @psalm-suppress RiskyCast
11
     */
12
    public static function getInt(string $key, int $default = 0): int
13
    {
14
        return (int)($_GET[$key] ?? $default);
15
    }
16
}
17