PlaylistRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getModelClass() 0 3 1
A getAllByCurrentUser() 0 3 1
1
<?php
2
3
namespace App\Repositories;
4
5
use App\Models\Playlist;
6
use App\Repositories\Traits\ByCurrentUser;
7
use Illuminate\Support\Collection;
8
9
class PlaylistRepository extends AbstractRepository
10
{
11
    use ByCurrentUser;
12
13 5
    public function getModelClass(): string
14
    {
15 5
        return Playlist::class;
16
    }
17
18 1
    public function getAllByCurrentUser(): Collection
19
    {
20 1
        return $this->byCurrentUser()->orderBy('name')->get();
21
    }
22
}
23