Skip to content

Commit

Permalink
Merged pull request #94
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Aug 20, 2024
2 parents b69786e + 7787630 commit 93d270b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ) )
{
Expand Down Expand Up @@ -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 ) )
{
Expand Down Expand Up @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion src/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions src/parser/rfc2231_implementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
4 changes: 2 additions & 2 deletions src/transports/transport_connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 93d270b

Please sign in to comment.