diff --git a/src/Exceptions/ModelValidationException.php b/src/Exceptions/ModelValidationException.php index cbe7bca..0f48675 100644 --- a/src/Exceptions/ModelValidationException.php +++ b/src/Exceptions/ModelValidationException.php @@ -8,25 +8,26 @@ class ModelValidationException extends Exception { /** - * Holds the defined errors + * Holds the defined errors. * * @var array */ protected $errors = []; /** - * Create the exception instance with custom data + * Create the exception instance with custom data. * - * @param mixed $message - * @param int $code + * @param mixed $message + * @param int $code * @param \Exception $previous */ - public function __construct($message = null, $code = 0, Exception $previous = null) { + public function __construct($message = null, $code = 0, Exception $previous = null) + { if ($message instanceof MessageBag) { foreach ($message->getMessages() as $column => $reason) { $this->errors = [ 'column' => $column, - 'reason' => $reason + 'reason' => $reason, ]; } } @@ -36,7 +37,7 @@ public function __construct($message = null, $code = 0, Exception $previous = nu } /** - * Get the setted errors + * Get the setted errors. * * @return void */ diff --git a/src/Facades/Order.php b/src/Facades/Order.php index 1ccae6d..4bf6a74 100644 --- a/src/Facades/Order.php +++ b/src/Facades/Order.php @@ -1,15 +1,16 @@ save(); } /** * Create a new order in the PTV database. * - * @param array $attributes + * @param array $attributes * * @return bool */ @@ -71,7 +72,7 @@ public function create(array $attributes) // Check if a multidimensional array was specified if not convert the single one that it looks like a multidimensional array if (!$attributes->has(0)) { $attributes = collect([ - $attributes->toArray() + $attributes->toArray(), ]); } @@ -109,9 +110,9 @@ public function create(array $attributes) // And we are done $this->preparedOrders[] = [ - 'header' => $header, - 'orderheader' => $orderHeader, - 'orderactionpoint' => $orderActionpoint + 'header' => $header, + 'orderheader' => $orderHeader, + 'orderactionpoint' => $orderActionpoint, ]; } @@ -158,7 +159,7 @@ public function delete(array $attributes) // Check if a multidimensional array was specified if not convert the single one that it looks like a multidimensional array if (!$attributes->has(0)) { $attributes = collect([ - $attributes->toArray() + $attributes->toArray(), ]); } @@ -183,7 +184,7 @@ public function delete(array $attributes) // And we are done $this->preparedOrders[] = [ - 'header' => $header + 'header' => $header, ]; } @@ -221,7 +222,7 @@ protected function fillAttributes(Collection $attributes) } /** - * Save the prepared orders (Does not mather if it is a create, update or delete. The different methods may be combined into one save) + * Save the prepared orders (Does not mather if it is a create, update or delete. The different methods may be combined into one save). * * @return void */ diff --git a/src/PtvServiceProvider.php b/src/PtvServiceProvider.php index fc3eeb8..cdd41d9 100644 --- a/src/PtvServiceProvider.php +++ b/src/PtvServiceProvider.php @@ -2,7 +2,6 @@ namespace Noxxie\Ptv; -use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Support\ServiceProvider; use InvalidArgumentException; diff --git a/src/Traits/defaultAttributes.php b/src/Traits/defaultAttributes.php index 9dcf2b0..3547778 100644 --- a/src/Traits/defaultAttributes.php +++ b/src/Traits/defaultAttributes.php @@ -17,7 +17,7 @@ trait defaultAttributes protected $unique_id; /** - * Holds the bool if the unique ID generation must be done again when then generate method is called + * Holds the bool if the unique ID generation must be done again when then generate method is called. * * @var bool */