Completed
Push — master ( f30036...f3ab2e )
by Chris
14s
created

UnauthorizedException::notLoggedIn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\Permission\Exceptions;
4
5
use Symfony\Component\HttpKernel\Exception\HttpException;
6
7
class UnauthorizedException extends HttpException
8
{
9
    public static function forRoles(array $roles): self
0 ignored issues
show
Unused Code introduced by
The parameter $roles is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
10
    {
11
        return new static(403, 'User does not have the right roles.', null, []);
12
    }
13
14
    public static function forPermissions(array $permissions): self
0 ignored issues
show
Unused Code introduced by
The parameter $permissions is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
15
    {
16
        return new static(403, 'User does not have the right permissions.', null, []);
17
    }
18
19
    public static function notLoggedIn(): self
20
    {
21
        return new static(403, 'User is not logged in.', null, []);
22
    }
23
}
24