allowedValues = $allowedValues; } /** * Returns a string representation of the object. * * @return string */ public function toString() { $expectedAsString = "'" . implode("', '", $this->allowedValues) . "'"; return "is one of $expectedAsString"; } /** * {@inheritdoc} */ protected function matches($other) { return in_array($other, $this->allowedValues, false); } }