AnyValueToken::isLast()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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