src/Generator.php
public function generate($lenght = 4, $separator = ' ')
    {
        $length = count($this->lists);

        $words = [];
        $randomArray = static::getRandomArray($lenght);
        foreach ($randomArray as $index => $random) {
            $list = $this->lists[$index % $length];
            $words[] = $list->get($random);
        }

        return implode($separator, $words);
    }
public function generate($lenght = 4, $separator = ' ')
    {
        $length = count($this->lists);

        $words = [];
        $randomArray = static::getRandomArray($lenght);
        foreach ($randomArray as $index => $random) {
            $list = $this->lists[$index % $length];
            $words[] = $list->get($random);
        }

        return implode($separator, $words);
    }
public function generate ( $ lenght = 4 , $ separator = ' ' ) { $ length = count ( $ this -> lists ) ; $ words = [ ] ; $ randomArray = static :: getRandomArray ( $ lenght ) ; foreach ( $ randomArray as $ index => $ random ) { $ list = $ this -> lists [ $ index % $ length ] ; $ words [ ] = $ list -> get ( $ random ) ; } return implode ( $ separator , $ words ) ; }
Generate password from word lists.

@param int    $lenght    Password length in words.
@param string $separator Word separator.

@return string Generated password.
Generate password from word lists .