Completed
Push — master ( c6cf43...d97653 )
by Martin
03:30 queued 15s
created

ProcessorDecorator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A parse() 0 4 1
A dump() 0 4 1
1
<?php
2
3
/*
4
 * This is part of the webuni/front-matter package.
5
 *
6
 * (c) Martin Hasoň <[email protected]>
7
 * (c) Webuni s.r.o. <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Webuni\FrontMatter\Processor;
14
15
abstract class ProcessorDecorator implements ProcessorInterface
16
{
17
    /** @var ProcessorInterface */
18
    private $wrapped;
19
20
    public function __construct(ProcessorInterface $wrapped)
21
    {
22
        $this->wrapped = $wrapped;
23
    }
24
25
    public function parse(string $string): array
26
    {
27
        return $this->wrapped->parse($string);
28
    }
29
30
    public function dump(array $data): string
31
    {
32
        return $this->wrapped->dump($data);
33
    }
34
}
35