PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php

https://bitbucket.org/alan_cordova/api-sb-map
PHP | 52 lines | 17 code | 5 blank | 30 comment | 0 complexity | c6e9b1489a9a2ecf3186e13ad4613ef4 MD5 | raw file
 1<?php
 2
 3/*
 4 * This file is part of the Prophecy.
 5 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
 6 *     Marcello Duarte <marcello.duarte@gmail.com>
 7 *
 8 * For the full copyright and license information, please view the LICENSE
 9 * file that was distributed with this source code.
10 */
11
12namespace Prophecy\Argument\Token;
13
14/**
15 * Any single value token.
16 *
17 * @author Konstantin Kudryashov <ever.zet@gmail.com>
18 */
19class 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}