src/TerminalObject/Dynamic/Confirm.php
public function confirmed()
    {
        if (in_array($this->default, ["y", "yes"], true)) {
            $this->prompt .= " [Y/n]";
        } else {
            $this->prompt .= " [y/N]";
        }

        $this->accept(['y', 'yes', 'n', 'no'], false);

        $response = strtolower($this->prompt());

        return (substr($response, 0, 1) === 'y');
    }
public function confirmed()
    {
        if (in_array($this->default, ["y", "yes"], true)) {
            $this->prompt .= " [Y/n]";
        } else {
            $this->prompt .= " [y/N]";
        }

        $this->accept(['y', 'yes', 'n', 'no'], false);

        $response = strtolower($this->prompt());

        return (substr($response, 0, 1) === 'y');
    }
public function confirmed ( ) { if ( in_array ( $ this -> default , [ "y" , "yes" ] , true ) ) { $ this -> prompt .= " [Y/n]" ; } else { $ this -> prompt .= " [y/N]" ; } $ this -> accept ( [ 'y' , 'yes' , 'n' , 'no' ] , false ) ; $ response = strtolower ( $ this -> prompt ( ) ) ; return ( substr ( $ response , 0 , 1 ) === 'y' ) ; }
Let us know if the user confirmed.

@return bool
Let us know if the user confirmed .