Skip to content

Commit

Permalink
Merge pull request #3 from tylercd100/scrutinizer-patch-1
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
tylercd100 committed Mar 24, 2016
2 parents 94b9b5c + 3bf02ed commit 668e964
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion migrations/2016_03_17_000000_create_lern_tables.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateLERNTables extends Migration {

Expand Down
12 changes: 7 additions & 5 deletions src/LERN.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ class LERN
*/
public function __construct(Notifier $notifier = null)
{
if (empty($notifier))
$notifier = new Notifier();
if (empty($notifier)) {
$notifier = new Notifier();
}
$this->notifier = $notifier;
}

Expand Down Expand Up @@ -55,8 +56,9 @@ public function record(Exception $e)
'trace' => $e->getTraceAsString(),
];

if ($e instanceof HttpExceptionInterface)
$opts['status_code'] = $e->getStatusCode();
if ($e instanceof HttpExceptionInterface) {
$opts['status_code'] = $e->getStatusCode();
}

return ExceptionModel::create($opts);
}
Expand All @@ -77,7 +79,7 @@ public function notify(Exception $e)
* @param HandlerInterface $handler The handler instance to add on
* @return Notifier Returns this
*/
public function pushHandler(HandlerInterface $handler){
public function pushHandler(HandlerInterface $handler) {
$this->notifier->pushHandler($handler);
return $this;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Notifications/MonologHandlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ class MonologHandlerFactory {
public function create($driver, $subject = null)
{
$this->config = config('lern.notify.' . $driver);
if (is_array($this->config))
return $this->{$driver}($subject);
if (is_array($this->config)) {
return $this->{$driver}($subject);
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Notifications/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Tylercd100\LERN\Notifications;

use Exception;
use Monolog\Logger;
use Monolog\Handler\HandlerInterface;
use Monolog\Logger;
use Tylercd100\LERN\Notifications\MonologHandlerFactory;

class Notifier {
Expand Down

0 comments on commit 668e964

Please sign in to comment.