AnyValueToken   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A scoreArgument() 0 4 1
A isLast() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Prophecy.
5
 * (c) Konstantin Kudryashov <[email protected]>
6
 *     Marcello Duarte <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Prophecy\Argument\Token;
13
14
/**
15
 * Any single value token.
16
 *
17
 * @author Konstantin Kudryashov <[email protected]>
18
 */
19
class AnyValueToken implements TokenInterface
20
{
21
    /**
22
     * Always scores 3 for any argument.
23
     *
24
     * @param $argument
25
     *
26
     * @return int
27
     */
28
    public function scoreArgument($argument)
29
    {
30
        return 3;
31
    }
32
33
    /**
34
     * Returns false.
35
     *
36
     * @return bool
37
     */
38
    public function isLast()
39
    {
40
        return false;
41
    }
42
43
    /**
44
     * Returns string representation for token.
45
     *
46
     * @return string
47
     */
48
    public function __toString()
49
    {
50
        return '*';
51
    }
52
}
53