Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 /**
  * Executes the matcher on a given argument value. Returns TRUE on a match, FALSE otherwise.
  *
  * Will bind the argument to the variable passed to the constructor.
  *
  * @param mixed $argument
  *
  * @return boolean
  */
 public function matches(&$argument)
 {
     if ($this->matcher === null || $this->matcher->matches($argument)) {
         $this->boundVariable = $argument;
         return true;
     } else {
         return false;
     }
 }
 /**
  * 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);
 }