/** * Executes the matcher on a given argument value. * * Sets the $argument to the value passed in the constructor * * @param mixed $argument * * @return boolean */ public function matches(&$argument) { if ($this->matcher === null || $this->matcher->matches($argument)) { $argument = $this->value; return true; } return false; }
public function __toString() { return sprintf('<captured parameter%s>', isset($this->matcher) ? " that is {$this->matcher->__toString()}" : ''); }
/** * Executes the matcher on a given argument value. Returns TRUE on a match, FALSE otherwise. * * @param mixed $argument * * @return boolean */ protected function matches(&$argument) { $this->adaptedMatcher->matches($argument); }