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

EndTransformer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A transform() 0 6 1
A skip() 0 4 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