JsonInput   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 13
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getData() 0 8 2
1
<?php
2
3
namespace Kelemen\ApiNette\Validator\Input;
4
5
class JsonInput implements InputInterface
6
{
7
    private $data = null;
8
9
    public function getData()
10
    {
11
        if ($this->data === null) {
12
            $this->data = json_decode(file_get_contents("php://input"), true);
13
        }
14
15
        return $this->data;
16
    }
17
}
18