You've already forked laravel-mail
Return type hints, psr, readme.md, composer.json
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
class BMailApi
|
||||
{
|
||||
@@ -25,7 +24,7 @@ class BMailApi
|
||||
* @return \Psr\Http\Message\StreamInterface
|
||||
* @throws BMailException
|
||||
*/
|
||||
public function send($template)
|
||||
public function send($template): StreamInterface
|
||||
{
|
||||
$url = config('bmail.api_url');
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
|
||||
class BMailException extends \Exception {}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
|
||||
class BMailServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
class BMailTemplate implements \JsonSerializable
|
||||
@@ -153,7 +152,7 @@ class BMailTemplate implements \JsonSerializable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'template' => $this->template,
|
||||
@@ -168,5 +167,4 @@ class BMailTemplate implements \JsonSerializable
|
||||
{
|
||||
return $this->toArray();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
class BMailChannel
|
||||
{
|
||||
public function send($notifiable, Notification $notification)
|
||||
/**
|
||||
* @param $notifiable
|
||||
* @param Notification $notification
|
||||
* @return \Psr\Http\Message\StreamInterface
|
||||
* @throws BMailException
|
||||
*/
|
||||
public function send($notifiable, Notification $notification): StreamInterface
|
||||
{
|
||||
$template = $notification->toTemplate($notifiable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user