TakeWhilePredicate   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 13
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 8 1
1
<?php
2
/**
3
 * File was created 06.05.2015 16:25
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
8
namespace PeekAndPoke\Component\Psi\Operation\Intermediate\Predicate;
9
10
use PeekAndPoke\Component\Psi\Solver\IntermediateContext;
11
12
/**
13
 * @author Karsten J. Gerber <[email protected]>
14
 */
15
class TakeWhilePredicate extends AbstractPredicateOperation
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 2
    public function apply($input, $index, IntermediateContext $context)
21
    {
22 2
        $take = $this->test($input, $index);
23
24 2
        $context->outUseItem     = $take;
25 2
        $context->outCanContinue = $take;
26
27 2
        return $input;
28
    }
29
}
30