public function addOption($value, string $label): Menu
    {
        $this->addMenuItem(
            new MenuOption(
                $value,
                $label,
                function (CliMenu $menu) {
                    $this->result = $menu->getSelectedItem()->getValue();
                    $menu->close();
                }
            )
        );

        return $this;
    }
public function addOption($value, string $label): Menu
    {
        $this->addMenuItem(
            new MenuOption(
                $value,
                $label,
                function (CliMenu $menu) {
                    $this->result = $menu->getSelectedItem()->getValue();
                    $menu->close();
                }
            )
        );

        return $this;
    }
public function addOption ( $ value , string $ label ) : Menu { $ this -> addMenuItem ( new MenuOption ( $ value , $ label , function ( CliMenu $ menu ) { $ this -> result = $ menu -> getSelectedItem ( ) -> getValue ( ) ; $ menu -> close ( ) ; } ) ) ; return $ this ; }
Adds a new option.

@param mixed $value
@param string $label

@return \NunoMaduro\LaravelConsoleMenu\Menu
Adds a new option .