public function assertColor($value) { if ($color = $this->coerceColor($value)) { return $color; } $this->throwError("expecting color"); }