Passed
Pull Request — master (#93)
by Fèvre
20:30 queued 14:54
created

CategoryRepository::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Xetaravel\Models\Repositories;
3
4
use Illuminate\Support\Collection;
5
use Xetaravel\Models\Category;
6
7
class CategoryRepository
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 Category::take(config('xetaravel.blog.categories_sidebar'))->orderBy('title', 'asc')->get();
17
    }
18
}
19