Passed
Pull Request — master (#5)
by Yo
02:29
created

SupportListNormalizer::normalize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
crap 2
1
<?php
2
namespace Yoanm\ComposerConfigManager\Application\Serializer\Normalizer;
3
4
use Yoanm\ComposerConfigManager\Domain\Model\Support;
5
6
class SupportListNormalizer
7
{
8
    /**
9
     * @param Support[] $supportList
10
     *
11
     * @return array
12
     */
13 1
    public function normalize(array $supportList)
14
    {
15 1
        $normalizeList = [];
16 1
        foreach ($supportList as $support) {
17 1
            $normalizeList[$support->getType()] = $support->getUrl();
18 1
        }
19
20 1
        return $normalizeList;
21
    }
22
}
23