PlaylistPolicy   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
c 0
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A owner() 0 3 1
1
<?php
2
3
namespace App\Policies;
4
5
use App\Models\Playlist;
6
use App\Models\User;
7
8
class PlaylistPolicy
9
{
10 5
    public function owner(User $user, Playlist $playlist): bool
11
    {
12 5
        return $user->id === $playlist->user_id;
13
    }
14
}
15