/var/www/flurhymez/vendor/phpspec/prophecy/src/Prophecy/Argument/Token
NameSizeModeActions
AnyValuesToken.php9860644editdlrm
AnyValueToken.php9390644editdlrm
ApproximateValueToken.php11660644editdlrm
ArrayCountToken.php17610644editdlrm
ArrayEntryToken.php37320644editdlrm
ArrayEveryEntryToken.php16820644editdlrm
CallbackToken.php15800644editdlrm
ExactValueToken.php30080644editdlrm
IdenticalValueToken.php15100644editdlrm
InArrayToken.php14890644editdlrm
LogicalAndToken.php17840644editdlrm
LogicalNotToken.php15510644editdlrm
NotInArrayToken.php14980644editdlrm
ObjectStateToken.php26170644editdlrm
StringContainsToken.php13000644editdlrm
TokenInterface.php9120644editdlrm
TypeToken.php17010644editdlrm
Edit: /var/www/flurhymez/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php (1761B)
* Marcello Duarte * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Prophecy\Argument\Token; /** * Array elements count token. * * @author Boris Mikhaylov */ class ArrayCountToken implements TokenInterface { private $count; /** * @param integer $value */ public function __construct($value) { $this->count = $value; } /** * Scores 6 when argument has preset number of elements. * * @param $argument * * @return bool|int */ public function scoreArgument($argument) { return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; } /** * Returns false. * * @return boolean */ public function isLast() { return false; } /** * Returns string representation for token. * * @return string */ public function __toString() { return sprintf('count(%s)', $this->count); } /** * Returns true if object is either array or instance of \Countable * * @param $argument * @return bool */ private function isCountable($argument) { return (is_array($argument) || $argument instanceof \Countable); } /** * Returns true if $argument has expected number of elements * * @param array|\Countable $argument * * @return bool */ private function hasProperCount($argument) { return $this->count === count($argument); } }