Completed
Pull Request — master (#1)
by Woody
27:07 queued 01:07
created

FormContentHandler::getParsedBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
namespace Equip\Handler;
3
4
class FormContentHandler extends ContentHandler
5
{
6
    /**
7
     * @inheritDoc
8
     */
9 2
    protected function isApplicableMimeType($mime)
10
    {
11 2
        return $mime === 'application/x-www-form-urlencoded';
12
    }
13
14
    /**
15
     * @inheritDoc
16
     */
17 1
    protected function getParsedBody($body)
18
    {
19 1
        parse_str($body, $parsed);
20 1
        return $parsed;
21
    }
22
}
23