Request::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 9
rs 10
cc 2
nc 2
nop 0
1
<?php
2
namespace Lepton\Http;
3
4
class Request
5
{
6
    public $method;
7
    public $post;
8
    public $get;
9
    public $cookie;
10
    public $files;
11
    public $url;
12
    public $contentType;
13
    public function __construct()
14
    {
15
        $this->method = trim($_SERVER['REQUEST_METHOD']);
16
        $this->contentType = !empty($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
17
        $this->cookie = $_COOKIE;
18
        $this->files = $_FILES;
19
        $this->post = $_POST;
20
        $this->get = $_GET;
21
        $this->url = $_SERVER['REQUEST_URI'];
22
    }
23
24
25
}