Completed
Push — develop ( ad187c...f818a7 )
by Jaap
09:04
created

Constant   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 9 2
1
<?php
2
/**
3
 * This file is part of phpDocumentor.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @copyright 2010-2016 Mike van Riel<[email protected]>
9
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
10
 * @link      http://phpdoc.org
11
 */
12
13
namespace phpDocumentor\Application\ReadModel\Mapper\Project;
14
15
use phpDocumentor\DomainModel\ReadModel\Mapper\Project\Interpret as InterpretInterface;
16
use phpDocumentor\Reflection\Php\Constant as ConstantType;
17
18
final class Constant extends AbstractReducer
19
{
20
    public function __invoke(InterpretInterface $command, $state)
21
    {
22
        if (!$command->subject() instanceof ConstantType) {
23
            return $command->interpreter()->next($command, $state);
24
        }
25
        $newState = ['constant'];
26
27
        return $newState;
28
    }
29
}
30