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 * Argument token interface. 16 * 17 * @author Konstantin Kudryashov <ever.zet@gmail.com> 18 */ 19interface TokenInterface 20{ 21 /** 22 * Calculates token match score for provided argument. 23 * 24 * @param $argument 25 * 26 * @return bool|int 27 */ 28 public function scoreArgument($argument); 29 30 /** 31 * Returns true if this token prevents check of other tokens (is last one). 32 * 33 * @return bool|int 34 */ 35 public function isLast(); 36 37 /** 38 * Returns string representation for token. 39 * 40 * @return string 41 */ 42 public function __toString(); 43} 44