public function generatePassword()
    {
        $choice = null;

        while(! in_array($choice, [1, 2])) {
            $this->info('What type of generated password would you like?');
            $this->info('[1] WordBased');
            $this->info('[2] Random');
            $choice = $this->ask('Please make a selection');

            if ($choice == 1) {
                return $this->makeGenerated('wordbased');
            }
            if ($choice == 2) {
                return $this->makeGenerated('random');
            }
        }
    }
public function generatePassword()
    {
        $choice = null;

        while(! in_array($choice, [1, 2])) {
            $this->info('What type of generated password would you like?');
            $this->info('[1] WordBased');
            $this->info('[2] Random');
            $choice = $this->ask('Please make a selection');

            if ($choice == 1) {
                return $this->makeGenerated('wordbased');
            }
            if ($choice == 2) {
                return $this->makeGenerated('random');
            }
        }
    }
public function generatePassword ( ) { $ choice = null ; while ( ! in_array ( $ choice , [ 1 , 2 ] ) ) { $ this -> info ( 'What type of generated password would you like?' ) ; $ this -> info ( '[1] WordBased' ) ; $ this -> info ( '[2] Random' ) ; $ choice = $ this -> ask ( 'Please make a selection' ) ; if ( $ choice == 1 ) { return $ this -> makeGenerated ( 'wordbased' ) ; } if ( $ choice == 2 ) { return $ this -> makeGenerated ( 'random' ) ; } } }
Get selection type of generated passwordgit
Get selection type of generated passwordgit