Completed
Push — master ( c36253...8f6ddc )
by Krzysztof
7s
created

EndTransformer::skip()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace KGzocha\Searcher\Chain;
4
5
/**
6
 * Use this class to indicate that there is no more searchers in the chain.
7
 * It is like a NullObject. It does not do much.
8
 *
9
 * @author Krzysztof Gzocha <[email protected]>
10
 */
11
final class EndTransformer implements TransformerInterface
12
{
13
    /**
14
     * @inheritDoc
15
     */
16 1
    public function transform($results)
17
    {
18 1
        throw new \RuntimeException(
19 1
            'Transform method on EmptyTransformer should never be called.'
20
        );
21
    }
22
23
    /**
24
     * @inheritDoc
25
     */
26 4
    public function skip($results)
27
    {
28 4
        return false;
29
    }
30
}
31