Skip to content

Commit

Permalink
💚 Fixing CI Build
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Dec 17, 2019
1 parent c73bd1f commit 0ed13a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 30 deletions.
6 changes: 3 additions & 3 deletions config/notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
*/
Expand All @@ -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
],

/*
Expand Down Expand Up @@ -83,7 +83,7 @@
'icon' => 'flaticon2-check-mark',
'model' => 'connect',
'title' => 'User Updated',
]
],
],

];
30 changes: 15 additions & 15 deletions src/LaravelNotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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');

Expand All @@ -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');

Expand All @@ -70,22 +70,22 @@ 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');

return $this;
}

/**
* 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';

Expand All @@ -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') ? '👍' : '🙅🏽‍♂';

Expand All @@ -111,26 +111,26 @@ 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');

return $this;
}

/**
* 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';
Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/LaravelNotifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -42,7 +42,7 @@ public function register()
}

/**
* Register Notify Blade
* Register Notify Blade.
*
* @retrun void
*/
Expand Down
14 changes: 7 additions & 7 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if (! function_exists('notify')) {
/**
* Notify
* Notify.
*
* @param string|null $message
* @return \Mckenziearts\Notify\LaravelNotify
Expand All @@ -21,7 +21,7 @@ function notify(string $message = null)

if (! function_exists('connectify')) {
/**
* Connectify
* Connectify.
*
* @param string $type
* @param string $title
Expand All @@ -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
Expand All @@ -53,7 +53,7 @@ function drakify(string $type)

if (! function_exists('smilify')) {
/**
* Smilify
* Smilify.
*
* @param string $type
* @param string|null $message
Expand All @@ -68,7 +68,7 @@ function smilify(string $type, string $message)
}
if (! function_exists('emotify')) {
/**
* Emotify
* Emotify.
*
* @param string $type
* @param string|null $message
Expand All @@ -88,7 +88,7 @@ function emotify(string $type, string $message)
*/
function notifyJs(): string
{
return '<script type="text/javascript" src="' . asset('vendor/mckenziearts/laravel-notify/js/notify.js') . '"></script>';
return '<script type="text/javascript" src="'.asset('vendor/mckenziearts/laravel-notify/js/notify.js').'"></script>';
}
}

Expand All @@ -98,6 +98,6 @@ function notifyJs(): string
*/
function notifyCss(): string
{
return '<link rel="stylesheet" type="text/css" href="' . asset('vendor/mckenziearts/laravel-notify/css/notify.css') . '"/>';
return '<link rel="stylesheet" type="text/css" href="'.asset('vendor/mckenziearts/laravel-notify/css/notify.css').'"/>';
}
}
2 changes: 0 additions & 2 deletions src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
*/

if (config('notify.demo')) {

Route::get('notify/demo', function () {
return view('notify::notify');
});

}
2 changes: 1 addition & 1 deletion tests/NotifyTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use PHPUnit\Framework\TestCase;
use Mckenziearts\Notify\LaravelNotify;
use PHPUnit\Framework\TestCase;

class NotifyTest extends TestCase
{
Expand Down

0 comments on commit 0ed13a2

Please sign in to comment.