Completed
Pull Request — master (#34)
by Fèvre
18:57 queued 15:50
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
7
class DiscussCategoryRepository
8
{
9
    /**
10
     * Find the categories for the sidebar.
11
     *
12
     * @return \Illuminate\Database\Eloquent\Collection|static[]
13
     */
14
    public static function sidebar(): Collection
15
    {
16
        return DiscussCategory::take(config('xetaravel.discuss.categories_sidebar'))->orderBy('title', 'asc')->get();
17
    }
18
}
19