Ptondereau\PackMe\Commands\CreateCommand::askForAuthor PHP Method

askForAuthor() protected method

protected askForAuthor ( string $author = 'Author Name <[email protected]>' ) : string
$author string
return string
    protected function askForAuthor($author = 'Author Name <[email protected]>')
    {
        $self = $this;
        return $this->askAndValidate('Author [<comment>' . $author . '</comment>]: ', function ($value) use($self, $author) {
            if (null === $value) {
                return $author;
            }
            $value = $value ?: $author;
            $parsed = $self->parseAuthorString($value);
            return sprintf('%s <%s>', $parsed['name'], $parsed['email']);
        }, null, $author);
    }