public function addAuthor(string $name = null, string $email = null)
    {
        is_null($name) and $name = '';
        is_null($email) and $email = '';

        if (empty($name) and empty($email)) {
            throw new AuthorNoDataException();
        }

        if (!empty($email)) {
            $author = trim(sprintf(self::FORMAT_AUTHOR, $name, $email));
        } else {
            $author = trim($name);
        }

        $this->authors[] = $author;

        return $this;
    }
public function addAuthor(string $name = null, string $email = null)
    {
        is_null($name) and $name = '';
        is_null($email) and $email = '';

        if (empty($name) and empty($email)) {
            throw new AuthorNoDataException();
        }

        if (!empty($email)) {
            $author = trim(sprintf(self::FORMAT_AUTHOR, $name, $email));
        } else {
            $author = trim($name);
        }

        $this->authors[] = $author;

        return $this;
    }
public function addAuthor ( string $ name = null , string $ email = null ) { is_null ( $ name ) and $ name = '' ; is_null ( $ email ) and $ email = '' ; if ( empty ( $ name ) and empty ( $ email ) ) { throw new AuthorNoDataException ( ) ; } if ( ! empty ( $ email ) ) { $ author = trim ( sprintf ( self :: FORMAT_AUTHOR , $ name , $ email ) ) ; } else { $ author = trim ( $ name ) ; } $ this -> authors [ ] = $ author ; return $ this ; }
Adds an author

@param string $name
@param string $email

@return IntercessionClass

@throws AuthorNoDataException
Adds an author