RouterUnitTestUtils::setRequestMethod()   A
last analyzed

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
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
}