RouterUnitTestUtils   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setRequestMethod() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
namespace Mezon\Router\Tests\Base;
4
5
class RouterUnitTestUtils
6
{
7
8
    const DELETE_REQUEST_METHOD = 'DELETE';
9
10
    /**
11
     * Function sets $_SERVER['REQUEST_METHOD']
12
     *
13
     * @param string $requestMethod
14
     *            request method
15
     */
16
    public static function setRequestMethod(string $requestMethod): void
17
    {
18
        $_SERVER['REQUEST_METHOD'] = $requestMethod;
19
    }
20
}