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

RouterUnitTestUtils::setRequestMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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
}