Completed
Pull Request — master (#61)
by Tomas
02:14
created

PutInputParam   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 5 1
1
<?php
2
3
namespace Tomaj\NetteApi\Params;
4
5
class PutInputParam extends InputParam
6
{
7
    protected $type = self::TYPE_PUT;
8
9 6
    public function getValue()
10
    {
11 6
        parse_str(file_get_contents("php://input"), $params);
12 6
        return $params[$this->key] ?? $this->default;
13
    }
14
}
15