ConvertSchemaObject::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php namespace HSkrasek\OpenAPI\Command\Stages;
2
3
use HSkrasek\OpenAPI\Converter;
4
use League\Pipeline\StageInterface;
5
6
class ConvertSchemaObject implements StageInterface
7
{
8
    /**
9
     * @var Converter
10
     */
11
    private $converter;
12
13
    public function __construct(Converter $converter)
14
    {
15
        $this->converter = $converter;
16
    }
17
18
    /**
19
     * @inheritDoc
20
     */
21
    public function __invoke($payload)
22
    {
23
        return $this->converter->convert($payload);
24
    }
25
}
26