Test Failed
Push — trunk ( e02d87...314b8c )
by SuperNova.WS
07:20
created

HttpRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fillCurrent() 0 4 1
A __construct() 0 4 1
1
<?php
2
/**
3
 * Created by Gorlum 13.02.2020 10:28
4
 */
5
6
namespace Core;
7
8
class HttpRequest {
9
  const REQUEST_GET = 'GET';
10
  const REQUEST_POST = 'POST';
11
12
  /**
13
   * @var GlobalContainer $gc
14
   */
15
  protected $gc;
16
17
  public $method = '';
18
  /**
19
   * @var HttpUrl $url
20
   */
21
  public $url;
22
23
  public function __construct(GlobalContainer $gc) {
24
    $this->gc = $gc;
25
26
    $this->url = new HttpUrl($this->gc);
27
  }
28
29
  public function fillCurrent() {
30
    $this->url->fillCurrent();
31
32
    $this->method = strtoupper($_SERVER['REQUEST_METHOD']);
33
34
  }
35
36
}
37