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

HttpRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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