Completed
Pull Request — master (#83)
by Sebastian
04:16
created

PersonRepository::getAllOnline()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Repositories;
4
5
use App\Models\Person;
6
use Illuminate\Support\Collection;
7
8
class PersonRepository
9
{
10
    public function getAll(): Collection
11
    {
12
        return Person::orderBy('publish_date', 'desc')->get();
13
    }
14
15
    public function getAllOnline(): Collection
16
    {
17
        return Person::online()
18
            ->orderBy('publish_date', 'desc')
19
            ->get();
20
    }
21
}
22