Sanitizer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getSanitizedList() 0 8 1
1
<?php
2
/**
3
 * Copyright © Vaimo Group. All rights reserved.
4
 * See LICENSE_VAIMO.txt for license details.
5
 */
6
namespace Vaimo\ComposerPatches\Patch\DefinitionList;
7
8
class Sanitizer
9
{
10
    /**
11
     * @var \Vaimo\ComposerPatches\Utils\DataUtils
12
     */
13
    private $dataUtils;
14
15
    public function __construct()
16
    {
17
        $this->dataUtils = new \Vaimo\ComposerPatches\Utils\DataUtils();
18
    }
19
20
    public function getSanitizedList(array $patches)
21
    {
22
        $dataUtils = $this->dataUtils;
23
24
        return $this->dataUtils->walkArrayNodes(
25
            $patches,
26
            function (array $value) use ($dataUtils) {
27
                return $dataUtils->removeKeysByPrefix($value, '_');
28
            }
29
        );
30
    }
31
}
32