Completed
Push — master ( c7e879...390e33 )
by Fèvre
02:26
created

DiscussCategoryRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A sidebar() 0 4 1
1
<?php
2
namespace Xetaravel\Models\Repositories;
3
4
use Illuminate\Support\Collection;
5
use Xetaravel\Models\DiscussCategory;
6
use Xetaravel\Models\DiscussConversation;
7
8
class DiscussCategoryRepository
9
{
10
    /**
11
     * Find the categories for the sidebar.
12
     *
13
     * @return \Illuminate\Database\Eloquent\Collection|static[]
14
     */
15
    public static function sidebar(): Collection
16
    {
17
        return DiscussCategory::take(config('xetaravel.discuss.categories_sidebar'))->orderBy('title', 'asc')->get();
18
    }
19
}
20