src/Console/HCCreateSuperAdminCommand.php
private function getEmail(): ? string
    {
        $email = $this->ask("Enter email address");

        $validator = Validator::make(['email' => $email], [
            'email' => 'required|min:3|email',
        ]);

        if ($validator->fails()) {
            $this->error('Email is required, minimum 3 symbols length and must be email format');

            return $this->getEmail();
        }

        $this->email = $email;

        return null;
    }
private function getEmail(): ? string
    {
        $email = $this->ask("Enter email address");

        $validator = Validator::make(['email' => $email], [
            'email' => 'required|min:3|email',
        ]);

        if ($validator->fails()) {
            $this->error('Email is required, minimum 3 symbols length and must be email format');

            return $this->getEmail();
        }

        $this->email = $email;

        return null;
    }
private function getEmail ( ) : ? string { $ email = $ this -> ask ( "Enter email address" ) ; $ validator = Validator :: make ( [ 'email' => $ email ] , [ 'email' => 'required|min:3|email' , ] ) ; if ( $ validator -> fails ( ) ) { $ this -> error ( 'Email is required, minimum 3 symbols length and must be email format' ) ; return $ this -> getEmail ( ) ; } $ this -> email = $ email ; return null ; }
Get email address

@return null|string
Get email address