@@ -1,7 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -if (! function_exists('flashtoast')) { |
|
| 4 | +if ( ! function_exists('flashtoast')) { |
|
| 5 | 5 | /** |
| 6 | 6 | * Arrange for a flash message. |
| 7 | 7 | * |
@@ -12,25 +12,25 @@ discard block |
||
| 12 | 12 | function flashtoast($message = null, $level = 'info') |
| 13 | 13 | { |
| 14 | 14 | $notifier = app('flashtoast'); |
| 15 | - if (! is_null($message)) { |
|
| 15 | + if ( ! is_null($message)) { |
|
| 16 | 16 | return $notifier->message($message, $level); |
| 17 | 17 | } |
| 18 | 18 | return $notifier; |
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -if (!function_exists('menuIsRoute')) { |
|
| 22 | +if ( ! function_exists('menuIsRoute')) { |
|
| 23 | 23 | function menuIsRoute($route, $active_class = 'active') { |
| 24 | 24 | $curr_route = Route::currentRouteName(); |
| 25 | - if($route == $curr_route) { |
|
| 25 | + if ($route == $curr_route) { |
|
| 26 | 26 | return $active_class; |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | -if (!function_exists('urlDoesContainParam')) { |
|
| 31 | +if ( ! function_exists('urlDoesContainParam')) { |
|
| 32 | 32 | function urlDoesContainParam($param_name, $param_value = true, $active_class = 'active') { |
| 33 | - if(request()->get($param_name) == $param_value) { |
|
| 33 | + if (request()->get($param_name) == $param_value) { |
|
| 34 | 34 | return $active_class; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -82,10 +82,10 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | // If no message was provided, we should update |
| 84 | 84 | // the most recently added message. |
| 85 | - if (! $message) { |
|
| 85 | + if ( ! $message) { |
|
| 86 | 86 | return $this->updateLastMessage(compact('level')); |
| 87 | 87 | } |
| 88 | - if (! $message instanceof Message) { |
|
| 88 | + if ( ! $message instanceof Message) { |
|
| 89 | 89 | $message = new Message(compact('message', 'level')); |
| 90 | 90 | } |
| 91 | 91 | $this->messages->push($message); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public function overlay($message = null, $title = 'Notice') |
| 113 | 113 | { |
| 114 | - if (! $message) { |
|
| 114 | + if ( ! $message) { |
|
| 115 | 115 | return $this->updateLastMessage(['title' => $title, 'overlay' => true]); |
| 116 | 116 | } |
| 117 | 117 | return $this->message( |
@@ -64,10 +64,10 @@ discard block |
||
| 64 | 64 | // Publishing the configuration file. |
| 65 | 65 | // echo "Publishing StarterKit Config ...\n"; |
| 66 | 66 | $this->publishes([ |
| 67 | - __DIR__ . '/../config/starter-kit.php' => config_path('starter-kit.php'), |
|
| 67 | + __DIR__.'/../config/starter-kit.php' => config_path('starter-kit.php'), |
|
| 68 | 68 | ], 'config'); |
| 69 | 69 | |
| 70 | - $this->mergeConfigFrom(__DIR__ . '/../config/starter-kit.php', 'StarterKit'); |
|
| 70 | + $this->mergeConfigFrom(__DIR__.'/../config/starter-kit.php', 'StarterKit'); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | public function register() |
| 79 | 79 | { |
| 80 | 80 | // Register the service the package provides. |
| 81 | - $this->app->singleton('StarterKit', function ($app) { |
|
| 81 | + $this->app->singleton('StarterKit', function($app) { |
|
| 82 | 82 | return new StarterKit; |
| 83 | 83 | }); |
| 84 | 84 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | ); |
| 91 | 91 | |
| 92 | 92 | // Register Flash Toast |
| 93 | - $this->app->singleton('flashtoast', function () { |
|
| 93 | + $this->app->singleton('flashtoast', function() { |
|
| 94 | 94 | return $this->app->make('RaysTech\StarterKit\Supports\FlashToast'); |
| 95 | 95 | }); |
| 96 | 96 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | public function loadHelpers() { |
| 109 | - foreach (glob(__DIR__ . '/Helpers/*.php') as $filename) { |
|
| 109 | + foreach (glob(__DIR__.'/Helpers/*.php') as $filename) { |
|
| 110 | 110 | require_once($filename); |
| 111 | 111 | } |
| 112 | 112 | } |