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 values token. 16 * 17 * @author Konstantin Kudryashov <ever.zet@gmail.com> 18 */ 19class AnyValuesToken implements TokenInterface 20{ 21 /** 22 * Always scores 2 for any argument. 23 * 24 * @param $argument 25 * 26 * @return int 27 */ 28 public function scoreArgument($argument) 29 { 30 return 2; 31 } 32 33 /** 34 * Returns true to stop wildcard from processing other tokens. 35 * 36 * @return bool 37 */ 38 public function isLast() 39 { 40 return true; 41 } 42 43 /** 44 * Returns string representation for token. 45 * 46 * @return string 47 */ 48 public function __toString() 49 { 50 return '* [, ...]'; 51 } 52} 53