@@ -11,7 +11,7 @@  | 
                                                    ||
| 11 | 11 | protected $namespace = 'Modules\Notification\Http\Controllers';  | 
                                                        
| 12 | 12 | |
| 13 | 13 | /**  | 
                                                        
| 14 | - * @return string  | 
                                                        |
| 14 | + * @return boolean  | 
                                                        |
| 15 | 15 | */  | 
                                                        
| 16 | 16 | protected function getFrontendRoute()  | 
                                                        
| 17 | 17 |      { | 
                                                        
@@ -23,7 +23,7 @@ discard block  | 
                                                    ||
| 23 | 23 | */  | 
                                                        
| 24 | 24 | protected function getBackendRoute()  | 
                                                        
| 25 | 25 |      { | 
                                                        
| 26 | - return __DIR__ . '/../Http/backendRoutes.php';  | 
                                                        |
| 26 | + return __DIR__.'/../Http/backendRoutes.php';  | 
                                                        |
| 27 | 27 | }  | 
                                                        
| 28 | 28 | |
| 29 | 29 | /**  | 
                                                        
@@ -31,6 +31,6 @@ discard block  | 
                                                    ||
| 31 | 31 | */  | 
                                                        
| 32 | 32 | protected function getApiRoute()  | 
                                                        
| 33 | 33 |      { | 
                                                        
| 34 | - return __DIR__ . '/../Http/apiRoutes.php';  | 
                                                        |
| 34 | + return __DIR__.'/../Http/apiRoutes.php';  | 
                                                        |
| 35 | 35 | }  | 
                                                        
| 36 | 36 | }  | 
                                                        
@@ -11,7 +11,7 @@  | 
                                                    ||
| 11 | 11 | */  | 
                                                        
| 12 | 12 | public function up()  | 
                                                        
| 13 | 13 |      { | 
                                                        
| 14 | -        Schema::create('notification__notifications', function (Blueprint $table) { | 
                                                        |
| 14 | +        Schema::create('notification__notifications', function(Blueprint $table) { | 
                                                        |
| 15 | 15 |              $table->increments('id'); | 
                                                        
| 16 | 16 |              $table->integer('user_id')->unsigned(); | 
                                                        
| 17 | 17 |              $table->string('type')->nullable(); | 
                                                        
@@ -74,6 +74,6 @@  | 
                                                    ||
| 74 | 74 | */  | 
                                                        
| 75 | 75 | public function markAllAsReadForUser($userId)  | 
                                                        
| 76 | 76 |      { | 
                                                        
| 77 | - return $this->model->whereUserId($userId)->update(['is_read' => true]);  | 
                                                        |
| 77 | + return $this->model->whereUserId($userId)->update([ 'is_read' => true ]);  | 
                                                        |
| 78 | 78 | }  | 
                                                        
| 79 | 79 | }  | 
                                                        
@@ -25,6 +25,6 @@  | 
                                                    ||
| 25 | 25 | */  | 
                                                        
| 26 | 26 | public function broadcastOn()  | 
                                                        
| 27 | 27 |      { | 
                                                        
| 28 | - return ['asgardcms.notifications.' . $this->notification->user_id];  | 
                                                        |
| 28 | + return [ 'asgardcms.notifications.'.$this->notification->user_id ];  | 
                                                        |
| 29 | 29 | }  | 
                                                        
| 30 | 30 | }  | 
                                                        
@@ -3,7 +3,7 @@  | 
                                                    ||
| 3 | 3 | use Illuminate\Routing\Router;  | 
                                                        
| 4 | 4 | |
| 5 | 5 | /** @var Router $router */  | 
                                                        
| 6 | -$router->group(['prefix' => '/notification'], function (Router $router) { | 
                                                        |
| 6 | +$router->group([ 'prefix' => '/notification' ], function(Router $router) { | 
                                                        |
| 7 | 7 |      $router->get('notifications', [ | 
                                                        
| 8 | 8 | 'as' => 'admin.notification.notification.index',  | 
                                                        
| 9 | 9 | 'uses' => 'NotificationsController@index',  | 
                                                        
@@ -3,4 +3,4 @@  | 
                                                    ||
| 3 | 3 | use Illuminate\Routing\Router;  | 
                                                        
| 4 | 4 | |
| 5 | 5 | /** @var Router $router */  | 
                                                        
| 6 | -$router->post('notification/mark-read', ['as' => 'api.notification.read', 'uses' => 'NotificationsController@markAsRead']); | 
                                                        |
| 6 | +$router->post('notification/mark-read', [ 'as' => 'api.notification.read', 'uses' => 'NotificationsController@markAsRead' ]); | 
                                                        |
@@ -44,7 +44,7 @@  | 
                                                    ||
| 44 | 44 | $this->notification->destroy($notification);  | 
                                                        
| 45 | 45 | |
| 46 | 46 |          return redirect()->route('admin.notification.notification.index') | 
                                                        
| 47 | -            ->withSuccess(trans('core::core.messages.resource deleted', ['name' => 'Notification'])); | 
                                                        |
| 47 | +            ->withSuccess(trans('core::core.messages.resource deleted', [ 'name' => 'Notification' ])); | 
                                                        |
| 48 | 48 | }  | 
                                                        
| 49 | 49 | |
| 50 | 50 | public function destroyAll()  | 
                                                        
@@ -35,7 +35,7 @@ discard block  | 
                                                    ||
| 35 | 35 | $this->registerBindings();  | 
                                                        
| 36 | 36 | $this->registerViewComposers();  | 
                                                        
| 37 | 37 | |
| 38 | - $this->app['events']->listen(  | 
                                                        |
| 38 | + $this->app[ 'events' ]->listen(  | 
                                                        |
| 39 | 39 | BuildingSidebar::class,  | 
                                                        
| 40 | 40 |              $this->getSidebarClassForModule('blog', RegisterNotificationSidebar::class) | 
                                                        
| 41 | 41 | );  | 
                                                        
@@ -45,7 +45,7 @@ discard block  | 
                                                    ||
| 45 | 45 |      { | 
                                                        
| 46 | 46 |          $this->publishConfig('notification', 'config'); | 
                                                        
| 47 | 47 |          $this->publishConfig('notification', 'permissions'); | 
                                                        
| 48 | - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');  | 
                                                        |
| 48 | + $this->loadMigrationsFrom(__DIR__.'/../Database/Migrations');  | 
                                                        |
| 49 | 49 | }  | 
                                                        
| 50 | 50 | |
| 51 | 51 | /**  | 
                                                        
@@ -62,10 +62,10 @@ discard block  | 
                                                    ||
| 62 | 62 |      { | 
                                                        
| 63 | 63 | $this->app->bind(  | 
                                                        
| 64 | 64 | NotificationRepository::class,  | 
                                                        
| 65 | -            function () { | 
                                                        |
| 65 | +            function() { | 
                                                        |
| 66 | 66 | $repository = new EloquentNotificationRepository(new Notification());  | 
                                                        
| 67 | 67 | |
| 68 | -                if (! config('app.cache')) { | 
                                                        |
| 68 | +                if (!config('app.cache')) { | 
                                                        |
| 69 | 69 | return $repository;  | 
                                                        
| 70 | 70 | }  | 
                                                        
| 71 | 71 | |
@@ -73,8 +73,8 @@ discard block  | 
                                                    ||
| 73 | 73 | }  | 
                                                        
| 74 | 74 | );  | 
                                                        
| 75 | 75 | |
| 76 | -        $this->app->bind(\Modules\Notification\Services\Notification::class, function ($app) { | 
                                                        |
| 77 | - return new AsgardNotification($app[NotificationRepository::class], $app[Authentication::class]);  | 
                                                        |
| 76 | +        $this->app->bind(\Modules\Notification\Services\Notification::class, function($app) { | 
                                                        |
| 77 | + return new AsgardNotification($app[ NotificationRepository::class ], $app[ Authentication::class ]);  | 
                                                        |
| 78 | 78 | });  | 
                                                        
| 79 | 79 | }  | 
                                                        
| 80 | 80 | |
@@ -40,15 +40,15 @@  | 
                                                    ||
| 40 | 40 | |
| 41 | 41 | protected function getEnvironmentSetUp($app)  | 
                                                        
| 42 | 42 |      { | 
                                                        
| 43 | - $app['path.base'] = __DIR__ . '/..';  | 
                                                        |
| 44 | -        $app['config']->set('database.default', 'sqlite'); | 
                                                        |
| 45 | -        $app['config']->set('database.connections.sqlite', array( | 
                                                        |
| 43 | + $app[ 'path.base' ] = __DIR__.'/..';  | 
                                                        |
| 44 | +        $app[ 'config' ]->set('database.default', 'sqlite'); | 
                                                        |
| 45 | +        $app[ 'config' ]->set('database.connections.sqlite', array( | 
                                                        |
| 46 | 46 | 'driver' => 'sqlite',  | 
                                                        
| 47 | 47 | 'database' => ':memory:',  | 
                                                        
| 48 | 48 | 'prefix' => '',  | 
                                                        
| 49 | 49 | ));  | 
                                                        
| 50 | -        $app['config']->set('translatable.locales', ['en', 'fr']); | 
                                                        |
| 51 | -        $app['config']->set('modules.paths.modules', __DIR__ . '/../Modules'); | 
                                                        |
| 50 | +        $app[ 'config' ]->set('translatable.locales', [ 'en', 'fr' ]); | 
                                                        |
| 51 | +        $app[ 'config' ]->set('modules.paths.modules', __DIR__.'/../Modules'); | 
                                                        |
| 52 | 52 | }  | 
                                                        
| 53 | 53 | |
| 54 | 54 | private function resetDatabase()  |