Skip to content

Commit

Permalink
Merge pull request #325 from nasirkhan/analysis-BMG7r6
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
nasirkhan committed Apr 23, 2022
2 parents ab2c11c + c150911 commit 786533d
Show file tree
Hide file tree
Showing 75 changed files with 223 additions and 359 deletions.
2 changes: 1 addition & 1 deletion Modules/Article/Database/Seeders/ArticleDatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Modules\Article\Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Modules\Article\Entities\Category;
use Modules\Article\Entities\Post;
Expand Down
4 changes: 1 addition & 3 deletions Modules/Article/Entities/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Modules\Article\Entities\Presenters\PostPresenter;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;
use Spatie\Activitylog\Traits\LogsActivity;

class Post extends BaseModel
{
Expand Down Expand Up @@ -145,7 +145,6 @@ public function setPublishedAtAttribute($value)
* Get the list of Published Articles.
*
* @param [type] $query [description]
*
* @return [type] [description]
*/
public function scopePublished($query)
Expand All @@ -170,7 +169,6 @@ public function scopeFeatured($query)
* Get the list of Recently Published Articles.
*
* @param [type] $query [description]
*
* @return [type] [description]
*/
public function scopeRecentlyPublished($query)
Expand Down
24 changes: 9 additions & 15 deletions Modules/Article/Http/Controllers/Backend/CategoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Flash;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
use Modules\Article\Http\Requests\Backend\CategoriesRequest;
use Yajra\DataTables\DataTables;

Expand Down Expand Up @@ -163,8 +163,7 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @param Request $request
* @return Response
*/
public function store(CategoriesRequest $request)
Expand All @@ -190,8 +189,7 @@ public function store(CategoriesRequest $request)
/**
* Display the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function show($id)
Expand Down Expand Up @@ -220,8 +218,7 @@ public function show($id)
/**
* Show the form for editing the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function edit($id)
Expand All @@ -248,9 +245,8 @@ public function edit($id)
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param int $id
*
* @param Request $request
* @param int $id
* @return Response
*/
public function update(CategoriesRequest $request, $id)
Expand Down Expand Up @@ -278,8 +274,7 @@ public function update(CategoriesRequest $request, $id)
/**
* Remove the specified resource from storage.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function destroy($id)
Expand Down Expand Up @@ -334,9 +329,8 @@ public function trashed()
/**
* Restore a soft deleted entry.
*
* @param Request $request
* @param int $id
*
* @param Request $request
* @param int $id
* @return Response
*/
public function restore($id)
Expand Down
26 changes: 10 additions & 16 deletions Modules/Article/Http/Controllers/Backend/PostsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

use App\Authorizable;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;
use Flash;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
use Modules\Article\Entities\Category;
use Modules\Article\Events\PostCreated;
use Modules\Article\Events\PostUpdated;
Expand Down Expand Up @@ -173,8 +173,7 @@ public function create()
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @param Request $request
* @return Response
*/
public function store(PostsRequest $request)
Expand Down Expand Up @@ -206,8 +205,7 @@ public function store(PostsRequest $request)
/**
* Display the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function show($id)
Expand Down Expand Up @@ -240,8 +238,7 @@ public function show($id)
/**
* Show the form for editing the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function edit($id)
Expand Down Expand Up @@ -270,9 +267,8 @@ public function edit($id)
/**
* Update the specified resource in storage.
*
* @param Request $request
* @param int $id
*
* @param Request $request
* @param int $id
* @return Response
*/
public function update(PostsRequest $request, $id)
Expand Down Expand Up @@ -309,8 +305,7 @@ public function update(PostsRequest $request, $id)
/**
* Remove the specified resource from storage.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function destroy($id)
Expand Down Expand Up @@ -365,9 +360,8 @@ public function trashed()
/**
* Restore a soft deleted entry.
*
* @param Request $request
* @param int $id
*
* @param Request $request
* @param int $id
* @return Response
*/
public function restore($id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public function index()
/**
* Display the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function show($id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public function index()
/**
* Display the specified resource.
*
* @param int $id
*
* @param int $id
* @return Response
*/
public function show($hashid)
Expand Down
11 changes: 5 additions & 6 deletions Modules/Article/Http/Middleware/GenerateMenus.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ class GenerateMenus
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
\Menu::make('admin_sidebar', function ($menu) {

// Articles Dropdown
$articles_menu = $menu->add('<i class="nav-icon fas fa-file-alt"></i> ' . __('Article'), [
$articles_menu = $menu->add('<i class="nav-icon fas fa-file-alt"></i> '.__('Article'), [
'class' => 'nav-group',
])
->data([
Expand All @@ -36,7 +35,7 @@ public function handle($request, Closure $next)
]);

// Submenu: Posts
$articles_menu->add('<i class="nav-icon fas fa-file-alt"></i> ' . __('Posts'), [
$articles_menu->add('<i class="nav-icon fas fa-file-alt"></i> '.__('Posts'), [
'route' => 'backend.posts.index',
'class' => 'nav-item',
])
Expand All @@ -49,7 +48,7 @@ public function handle($request, Closure $next)
'class' => 'nav-link',
]);
// Submenu: Categories
$articles_menu->add('<i class="nav-icon fas fa-sitemap"></i> ' . __('Categories'), [
$articles_menu->add('<i class="nav-icon fas fa-sitemap"></i> '.__('Categories'), [
'route' => 'backend.categories.index',
'class' => 'nav-item',
])
Expand Down
3 changes: 1 addition & 2 deletions Modules/Article/Listeners/PostCreated/CreatePostData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct()
/**
* Handle the event.
*
* @param object $event
*
* @param object $event
* @return void
*/
public function handle(PostCreated $event)
Expand Down
3 changes: 1 addition & 2 deletions Modules/Article/Listeners/PostUpdated/UpdatePostData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct()
/**
* Handle the event.
*
* @param object $event
*
* @param object $event
* @return void
*/
public function handle(PostUpdated $event)
Expand Down
3 changes: 1 addition & 2 deletions Modules/Article/Listeners/PostViewed/IncrementHitCount.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct()
/**
* Handle the event.
*
* @param object $event
*
* @param object $event
* @return void
*/
public function handle(PostViewed $event)
Expand Down
2 changes: 1 addition & 1 deletion Modules/Article/Providers/ArticleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function registerTranslations()
/**
* Register commands.
*
* @param string $namespace
* @param string $namespace
*/
protected function registerCommands($namespace = '')
{
Expand Down
2 changes: 1 addition & 1 deletion Modules/Article/Resources/lang/en/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
'meta_og_url' => 'Meta Open Graph URL',
'order' => 'Order',

];
];
4 changes: 1 addition & 3 deletions Modules/Comment/Entities/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getActivitylogOptions(): LogOptions
->dontSubmitEmptyLogs()
->useLogName($this->table);
}

/**
* Get the owning commentable model.
*/
Expand Down Expand Up @@ -116,7 +116,6 @@ public function setModeratedAtAttribute($value)
* Get the list of Published Articles.
*
* @param [type] $query [description]
*
* @return [type] [description]
*/
public function scopePublished($query)
Expand All @@ -130,7 +129,6 @@ public function scopePublished($query)
* Get the list of Recently Published Articles.
*
* @param [type] $query [description]
*
* @return [type] [description]
*/
public function scopeRecentlyPublished($query)
Expand Down
Loading

0 comments on commit 786533d

Please sign in to comment.