AbstractResponse::getValue()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 1
nc 1
1
<?php
2
3
namespace ChainableTest\Fixtures;
4
5
use Chainable\ChainableInterface;
6
use Chainable\Result\ChainResult;
7
use Chainable\Result\ChainResultInterface;
8
9
abstract class AbstractResponse implements ChainableInterface
10
{
11
    abstract public function getValue();
12
13
    /**
14
     * @param mixed $data
15
     *
16
     * @return ChainResultInterface
17
     */
18
    public function process(... $data)
19
    {
20
        $value = reset($data);
21
22
        return new ChainResult($this->getValue(), reset($value) === $this->getValue());
23
    }
24
}
25