diff --git a/src/composer.php b/src/composer.php index 5bf2f2a..94bfe9b 100644 --- a/src/composer.php +++ b/src/composer.php @@ -166,9 +166,9 @@ class ezcMailComposer extends ezcMail /** * Constructs an empty ezcMailComposer object. * - * @param ezcMailComposerOptions $options + * @param ezcMailComposerOptions|null $options */ - public function __construct( ezcMailComposerOptions $options = null ) + public function __construct( ?ezcMailComposerOptions $options = null ) { $this->properties['plainText'] = null; $this->properties['htmlText'] = null; @@ -298,7 +298,7 @@ public function __isset( $name ) * the Mail component. Use addFileAttachment() and * addStringAttachment() instead. */ - public function addAttachment( $fileName, $content = null, $contentType = null, $mimeType = null, ezcMailContentDispositionHeader $contentDisposition = null ) + public function addAttachment( $fileName, $content = null, $contentType = null, $mimeType = null, ?ezcMailContentDispositionHeader $contentDisposition = null ) { if ( is_null( $content ) ) { @@ -330,7 +330,7 @@ public function addAttachment( $fileName, $content = null, $contentType = null, * @param string $mimeType * @param ezcMailContentDispositionHeader $contentDisposition */ - public function addFileAttachment( $fileName, $contentType = null, $mimeType = null, ezcMailContentDispositionHeader $contentDisposition = null ) + public function addFileAttachment( $fileName, $contentType = null, $mimeType = null, ?ezcMailContentDispositionHeader $contentDisposition = null ) { if ( is_readable( $fileName ) ) { @@ -369,7 +369,7 @@ public function addFileAttachment( $fileName, $contentType = null, $mimeType = n * @param string $mimeType * @param ezcMailContentDispositionHeader $contentDisposition */ - public function addStringAttachment( $fileName, $content, $contentType = null, $mimeType = null, ezcMailContentDispositionHeader $contentDisposition = null ) + public function addStringAttachment( $fileName, $content, $contentType = null, $mimeType = null, ?ezcMailContentDispositionHeader $contentDisposition = null ) { $this->attachments[] = array( $fileName, $content, $contentType, $mimeType, $contentDisposition ); } diff --git a/src/mail.php b/src/mail.php index 0e344e4..2414efd 100644 --- a/src/mail.php +++ b/src/mail.php @@ -140,7 +140,7 @@ class ezcMail extends ezcMailPart /** * Constructs an empty ezcMail object. */ - public function __construct( ezcMailOptions $options = null ) + public function __construct( ?ezcMailOptions $options = null ) { parent::__construct(); diff --git a/src/parser/rfc2231_implementation.php b/src/parser/rfc2231_implementation.php index 985660c..5c1440b 100644 --- a/src/parser/rfc2231_implementation.php +++ b/src/parser/rfc2231_implementation.php @@ -137,10 +137,10 @@ public static function parseHeader( $header ) * will not clear out any old values in the object. * * @param string $header - * @param ezcMailContentDispositionHeader $cd + * @param ezcMailContentDispositionHeader|null $cd * @return ezcMailContentDispositionHeader */ - public static function parseContentDisposition( $header, ezcMailContentDispositionHeader $cd = null ) + public static function parseContentDisposition( $header, ?ezcMailContentDispositionHeader $cd = null ) { if ( $cd === null ) { diff --git a/src/transports/transport_connection.php b/src/transports/transport_connection.php index 0f6f048..443648d 100644 --- a/src/transports/transport_connection.php +++ b/src/transports/transport_connection.php @@ -75,9 +75,9 @@ class ezcMailTransportConnection * if $options contains a property with a value not allowed * @param string $server * @param int $port - * @param ezcMailTransportOptions $options + * @param ezcMailTransportOptions|null $options */ - public function __construct( $server, $port, ezcMailTransportOptions $options = null ) + public function __construct( $server, $port, ?ezcMailTransportOptions $options = null ) { $errno = null; $errstr = null;