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

PutInputParam::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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