Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikaim committed Dec 24, 2023
1 parent 79631eb commit 11f0fa5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Interfaces/MailInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface MailInterface
*
* @return MailInterface
*/
public function build();
public function build(): object;

/**
* Get Email message instance
Expand All @@ -40,5 +40,5 @@ public function getFrom();
* @param string|null $name
* @return Self
*/
public function from($email, ?string $name = null);
public function from($email, ?string $name = null): object;
}
26 changes: 13 additions & 13 deletions Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getErros(): array
*/
public function hasError(): bool
{
return (count($this->errros) > 0);
return (count($this->errors) > 0);
}

/**
Expand All @@ -91,7 +91,7 @@ public function hasError(): bool
* @param MailerInterface $mailer
* @return Self
*/
public static function create(MailerInterface $mailer)
public static function create(MailerInterface $mailer): object
{
return new Self($mailer);
}
Expand All @@ -101,7 +101,7 @@ public static function create(MailerInterface $mailer)
*
* @return Self
*/
public function build()
public function build(): object
{
return $this;
}
Expand All @@ -112,7 +112,7 @@ public function build()
* @param string $subject
* @return Self
*/
public function subject(string $subject)
public function subject(string $subject): object
{
$this->message->subject($subject);

Expand All @@ -127,7 +127,7 @@ public function subject(string $subject)
* @param string $contentType
* @return Self
*/
public function attach(string $path, string $name = null, string $contentType = null)
public function attach(string $path, string $name = null, string $contentType = null): object
{
$this->message->attachFromPath($path,$name,$contentType);

Expand All @@ -141,7 +141,7 @@ public function attach(string $path, string $name = null, string $contentType =
* @param string|null $name
* @return Self
*/
public function from($email, ?string $name = null)
public function from($email, ?string $name = null): object
{
try {
$email = \trim($email ?? '');
Expand Down Expand Up @@ -169,7 +169,7 @@ public function getFrom()
* @param string|null $name
* @return Self
*/
public function to($email, ?string $name = null)
public function to($email, ?string $name = null): object
{
try {
$email = \trim($email ?? '');
Expand All @@ -190,7 +190,7 @@ public function to($email, ?string $name = null)
* @param string|null $name
* @return Self
*/
public function replyTo($email, ?string $name = null)
public function replyTo($email, ?string $name = null): object
{
try {
$email = \trim($email ?? '');
Expand All @@ -210,7 +210,7 @@ public function replyTo($email, ?string $name = null)
* @param string|null $name
* @return Self
*/
public function cc($email, ?string $name = null)
public function cc($email, ?string $name = null): object
{
try {
$email = \trim($email ?? '');
Expand All @@ -230,7 +230,7 @@ public function cc($email, ?string $name = null)
* @param string|null $name
* @return Self
*/
public function bcc($email, ?string $name = null)
public function bcc($email, ?string $name = null): object
{
try {
$email = \trim($email ?? '');
Expand All @@ -249,7 +249,7 @@ public function bcc($email, ?string $name = null)
* @param integer $priority
* @return Self
*/
public function priority(int $priority = 3)
public function priority(int $priority = 3): object
{
$this->message->priority($priority);

Expand All @@ -262,7 +262,7 @@ public function priority(int $priority = 3)
* @param string $message
* @return Self
*/
public function message(string $message, ?string $contentType = null)
public function message(string $message, ?string $contentType = null): object
{
if (empty($contentType) == true) {
// detect
Expand All @@ -284,7 +284,7 @@ public function message(string $message, ?string $contentType = null)
* @param string $type
* @return Self
*/
public function contentType(string $type = Self::PLAIN_CONTENT_TYPE)
public function contentType(string $type = Self::PLAIN_CONTENT_TYPE): object
{
$this->contentType = $type;

Expand Down

0 comments on commit 11f0fa5

Please # to comment.