Completed
Pull Request — master (#67)
by Krzysztof
12:49
created

EmptyTransformer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 40%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 20
ccs 2
cts 5
cp 0.4
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
 * @author Krzysztof Gzocha <[email protected]>
7
 */
8
class EmptyTransformer implements TransformerInterface
9
{
10
    /**
11
     * @inheritDoc
12
     */
13
    public function transform($results)
14
    {
15
        throw new \RuntimeException(
16
            'Transform method on EmptyTransformer should never be called.'
17
        );
18
    }
19
20
    /**
21
     * @inheritDoc
22
     */
23 1
    public function skip($results)
24
    {
25 1
        return false;
26
    }
27
}
28