Ejemplo n.º 1
0
 /**
  * @param string $name
  *
  * @return IOption
  *
  * @throws InvalidOptionNameException
  */
 public function setName($name)
 {
     if ($name !== null && !$this->argumentsParser->isOptionName($name)) {
         throw new InvalidOptionNameException(s('A option name must have this format: "--option", got: "%s"', $name));
     }
     $this->name = $name;
     return $this;
 }