Code Duplication    Length = 11-11 lines in 2 locations

src/Manipulator/ArrayManipulator.php 2 locations

@@ 17-27 (lines=11) @@
14
        $this->pipeline = new Pipeline();
15
    }
16
17
    public function append($key, $args)
18
    {
19
        $this->pipeline = $this->pipeline->pipe(
20
            function ($serializedBase) use ($key, $args) {
21
                $keysDepth = \explode('>', $key);
22
                $this->setNestedValue($serializedBase, $keysDepth, $args);
23
24
                return $serializedBase;
25
            }
26
        );
27
    }
28
29
    private function setNestedValue(&$serializedBase, array $keysDepth, $value)
30
    {
@@ 42-52 (lines=11) @@
39
        return $this->setNestedValue($serializedBase[$currentKey], $keysDepth, $value);
40
    }
41
42
    public function filter($key)
43
    {
44
        $this->pipeline = $this->pipeline->pipe(
45
            function ($serializedBase) use ($key) {
46
                $keysDepth = \explode('>', $key);
47
                $this->unsetNestedValue($serializedBase, $keysDepth);
48
49
                return $serializedBase;
50
            }
51
        );
52
    }
53
54
    private function unsetNestedValue(&$serializedBase, array $keysDepth)
55
    {