Passed
Push — master ( 4cfdc5...37c7d0 )
by Alex
07:00
created

RouterUnitTestUtils   A

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
namespace Mezon\Router\Tests\Base;
3
4
class RouterUnitTestUtils
5
{
6
7
    const DELETE_REQUEST_METHOD = 'DELETE';
8
9
    /**
10
     * Function sets $_SERVER['REQUEST_METHOD']
11
     *
12
     * @param string $requestMethod
13
     *            request method
14
     */
15
    public static function setRequestMethod(string $requestMethod): void
16
    {
17
        $_SERVER['REQUEST_METHOD'] = $requestMethod;
18
    }
19
}