Completed
Pull Request — master (#61)
by Michal
02:15
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
declare(strict_types=1);
4
5
namespace Tomaj\NetteApi\Params;
6
7
class PutInputParam extends InputParam
8
{
9
    protected $type = self::TYPE_PUT;
10
11 6
    public function getValue()
12
    {
13 6
        parse_str(file_get_contents("php://input"), $params);
14 6
        return $params[$this->key] ?? $this->default;
15
    }
16
}
17