@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -use Illuminate\Database\Schema\Blueprint; |
|
| 4 | 3 | use Illuminate\Database\Migrations\Migration; |
| 4 | +use Illuminate\Database\Schema\Blueprint; |
|
| 5 | 5 | |
| 6 | 6 | class CreateLERNTables extends Migration { |
| 7 | 7 | |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | namespace Tylercd100\LERN\Notifications; |
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | -use Monolog\Logger; |
|
| 7 | 6 | use Monolog\Handler\HandlerInterface; |
| 7 | +use Monolog\Logger; |
|
| 8 | 8 | use Tylercd100\LERN\Notifications\MonologHandlerFactory; |
| 9 | 9 | |
| 10 | 10 | class Notifier { |
@@ -21,8 +21,9 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function __construct(Notifier $notifier = null) |
| 23 | 23 | { |
| 24 | - if (empty($notifier)) |
|
| 25 | - $notifier = new Notifier(); |
|
| 24 | + if (empty($notifier)) { |
|
| 25 | + $notifier = new Notifier(); |
|
| 26 | + } |
|
| 26 | 27 | $this->notifier = $notifier; |
| 27 | 28 | } |
| 28 | 29 | |
@@ -55,8 +56,9 @@ discard block |
||
| 55 | 56 | 'trace' => $e->getTraceAsString(), |
| 56 | 57 | ]; |
| 57 | 58 | |
| 58 | - if ($e instanceof HttpExceptionInterface) |
|
| 59 | - $opts['status_code'] = $e->getStatusCode(); |
|
| 59 | + if ($e instanceof HttpExceptionInterface) { |
|
| 60 | + $opts['status_code'] = $e->getStatusCode(); |
|
| 61 | + } |
|
| 60 | 62 | |
| 61 | 63 | return ExceptionModel::create($opts); |
| 62 | 64 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | * @param HandlerInterface $handler The handler instance to add on |
| 78 | 78 | * @return Notifier Returns this |
| 79 | 79 | */ |
| 80 | - public function pushHandler(HandlerInterface $handler){ |
|
| 80 | + public function pushHandler(HandlerInterface $handler) { |
|
| 81 | 81 | $this->notifier->pushHandler($handler); |
| 82 | 82 | return $this; |
| 83 | 83 | } |
@@ -18,8 +18,9 @@ |
||
| 18 | 18 | public function create($driver, $subject = null) |
| 19 | 19 | { |
| 20 | 20 | $this->config = config('lern.notify.' . $driver); |
| 21 | - if (is_array($this->config)) |
|
| 22 | - return $this->{$driver}($subject); |
|
| 21 | + if (is_array($this->config)) { |
|
| 22 | + return $this->{$driver}($subject); |
|
| 23 | + } |
|
| 23 | 24 | } |
| 24 | 25 | |
| 25 | 26 | /** |