pixelfed/pixelfed

View on GitHub
app/Http/Controllers/Admin/AdminHashtagsController.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method hashtagsApi has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function hashtagsApi(Request $request)
    {
        $this->validate($request, [
            'action' => 'sometimes|in:banned,nsfw',
            'sort' => 'sometimes|in:id,name,cached_count,can_search,can_trend,is_banned,is_nsfw',
Severity: Minor
Found in app/Http/Controllers/Admin/AdminHashtagsController.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return AdminHashtag::collection($hashtags);
    Severity: Major
    Found in app/Http/Controllers/Admin/AdminHashtagsController.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return $q->whereIsNsfw(true);
      Severity: Major
      Found in app/Http/Controllers/Admin/AdminHashtagsController.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status