diff --git a/config/notify.php b/config/notify.php
index 9d48f04..7706a2d 100644
--- a/config/notify.php
+++ b/config/notify.php
@@ -21,7 +21,7 @@
| Demo URL
|--------------------------------------------------------------------------
|
- | if true you can acces to the demo documentation of the notify package
+ | if true you can access to the demo documentation of the notify package
| here: http://localhost:8000/notify/demo, by default is true
|
*/
@@ -40,7 +40,7 @@
'animate' => [
'in_class' => 'bounceInRight', // The class to use to animate the notice in.
'out_class' => 'bounceOutRight', // The class to use to animate the notice out.
- 'timeout' => 5000 // Number of seconds before the notice disappears
+ 'timeout' => 5000, // Number of seconds before the notice disappears
],
/*
@@ -83,7 +83,7 @@
'icon' => 'flaticon2-check-mark',
'model' => 'connect',
'title' => 'User Updated',
- ]
+ ],
],
];
diff --git a/src/LaravelNotify.php b/src/LaravelNotify.php
index bdb63ba..8349eb2 100644
--- a/src/LaravelNotify.php
+++ b/src/LaravelNotify.php
@@ -31,7 +31,7 @@ public function __construct(Session $session)
* @param string $message
* @return $this
*/
- public function info(string $message): LaravelNotify
+ public function info(string $message): self
{
$this->flash($message, 'info', 'flaticon-exclamation-1', 'toast');
@@ -44,7 +44,7 @@ public function info(string $message): LaravelNotify
* @param string $message
* @return $this
*/
- public function success(string $message): LaravelNotify
+ public function success(string $message): self
{
$this->flash($message, 'success', 'flaticon2-check-mark', 'toast');
@@ -57,7 +57,7 @@ public function success(string $message): LaravelNotify
* @param string $message
* @return $this
*/
- public function error(string $message): LaravelNotify
+ public function error(string $message): self
{
$this->flash($message, 'error', 'flaticon2-delete', 'toast');
@@ -70,7 +70,7 @@ public function error(string $message): LaravelNotify
* @param string $message
* @return $this
*/
- public function warning(string $message): LaravelNotify
+ public function warning(string $message): self
{
$this->flash($message, 'warning', 'flaticon-warning-sign', 'toast');
@@ -78,14 +78,14 @@ public function warning(string $message): LaravelNotify
}
/**
- * Return a Connect Notification
+ * Return a Connect Notification.
*
* @param string $type
* @param string $title
* @param string $message
* @return $this
*/
- public function connect(string $type, string $title, string $message): LaravelNotify
+ public function connect(string $type, string $title, string $message): self
{
$icon = ($type === 'success') ? 'flaticon-like' : 'flaticon-cancel';
@@ -95,13 +95,13 @@ public function connect(string $type, string $title, string $message): LaravelNo
}
/**
- * Return a smiley notify
+ * Return a smiley notify.
*
* @param string $type
* @param string $message
* @return $this
*/
- public function smiley(string $type, string $message): LaravelNotify
+ public function smiley(string $type, string $message): self
{
$icon = ($type === 'success') ? '👍' : '🙅🏽♂';
@@ -111,13 +111,13 @@ public function smiley(string $type, string $message): LaravelNotify
}
/**
- * Return a smiley notify
+ * Return a smiley notify.
*
* @param string $type
* @param string $message
* @return $this
*/
- public function emotify(string $type, string $message): LaravelNotify
+ public function emotify(string $type, string $message): self
{
$this->flash($message, $type, null, 'emotify');
@@ -125,12 +125,12 @@ public function emotify(string $type, string $message): LaravelNotify
}
/**
- * Return a drake notify
+ * Return a drake notify.
*
* @param string $type
* @return $this
*/
- public function drake(string $type): LaravelNotify
+ public function drake(string $type): self
{
$icon = ($type === 'success') ? 'flaticon2-check-mark' : 'flaticon2-cross';
$message = ($type === 'success') ? 'Success' : 'Try Again';
@@ -156,11 +156,11 @@ public function drake(string $type): LaravelNotify
* @return LaravelNotify
* @throws Exception
*/
- public function preset(string $presetName, array $overrideValues = []): LaravelNotify
+ public function preset(string $presetName, array $overrideValues = []): self
{
$presetValues = config('notify.preset-messages.'.$presetName);
- if (!$presetValues) {
+ if (! $presetValues) {
throw new MissingPresetNotificationException('A preset message does not exist with the name: '.$presetName);
}
@@ -193,7 +193,7 @@ public function flash($message, $type = null, $icon = null, string $model = null
'type' => $type,
'icon' => $icon,
'model' => $model,
- 'title' => $title
+ 'title' => $title,
];
$this->session->flash('notify', $notifications);
diff --git a/src/LaravelNotifyServiceProvider.php b/src/LaravelNotifyServiceProvider.php
index ee6e87b..f34f198 100644
--- a/src/LaravelNotifyServiceProvider.php
+++ b/src/LaravelNotifyServiceProvider.php
@@ -18,7 +18,7 @@ public function boot()
__DIR__.'/../public' => public_path('vendor/mckenziearts/laravel-notify'),
], 'notify-assets');
$this->publishes([
- __DIR__ . '/../config/notify.php' => config_path('notify.php'),
+ __DIR__.'/../config/notify.php' => config_path('notify.php'),
], 'notify-config');
$this->loadViewsFrom(__DIR__.'/../resources/views', 'notify');
@@ -42,7 +42,7 @@ public function register()
}
/**
- * Register Notify Blade
+ * Register Notify Blade.
*
* @retrun void
*/
diff --git a/src/helpers.php b/src/helpers.php
index 88ba6db..2c57ed1 100644
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -2,7 +2,7 @@
if (! function_exists('notify')) {
/**
- * Notify
+ * Notify.
*
* @param string|null $message
* @return \Mckenziearts\Notify\LaravelNotify
@@ -21,7 +21,7 @@ function notify(string $message = null)
if (! function_exists('connectify')) {
/**
- * Connectify
+ * Connectify.
*
* @param string $type
* @param string $title
@@ -38,7 +38,7 @@ function connectify(string $type, string $title, string $message)
if (! function_exists('drakify')) {
/**
- * Drakify
+ * Drakify.
*
* @param string $type
* @return \Mckenziearts\Notify\LaravelNotify
@@ -53,7 +53,7 @@ function drakify(string $type)
if (! function_exists('smilify')) {
/**
- * Smilify
+ * Smilify.
*
* @param string $type
* @param string|null $message
@@ -68,7 +68,7 @@ function smilify(string $type, string $message)
}
if (! function_exists('emotify')) {
/**
- * Emotify
+ * Emotify.
*
* @param string $type
* @param string|null $message
@@ -88,7 +88,7 @@ function emotify(string $type, string $message)
*/
function notifyJs(): string
{
- return '';
+ return '';
}
}
@@ -98,6 +98,6 @@ function notifyJs(): string
*/
function notifyCss(): string
{
- return '';
+ return '';
}
}
diff --git a/src/routes.php b/src/routes.php
index ee3d441..db8fea4 100644
--- a/src/routes.php
+++ b/src/routes.php
@@ -12,9 +12,7 @@
*/
if (config('notify.demo')) {
-
Route::get('notify/demo', function () {
return view('notify::notify');
});
-
}
diff --git a/tests/NotifyTest.php b/tests/NotifyTest.php
index 31b3cba..deb5a85 100644
--- a/tests/NotifyTest.php
+++ b/tests/NotifyTest.php
@@ -1,7 +1,7 @@