ClaimManager
last analyzed

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
add() 0 1 ?
check() 0 1 ?
remove() 0 1 ?
removeAll() 0 1 ?
1
<?php
2
3
namespace WWON\JwtGuard\Contract;
4
5
use WWON\JwtGuard\Claim;
6
7
/**
8
 * Interface ClaimManager
9
 *
10
 * This manager will manage and keep track of claim to in the persisting database
11
 * and will use that to validate claim
12
 */
13
interface ClaimManager
14
{
15
16
    /**
17
     * add claim to the white list
18
     *
19
     * @param Claim $claim
20
     * @return bool
21
     */
22
    public function add(Claim $claim);
23
24
    /**
25
     * check that claim is in the white list
26
     *
27
     * @param Claim $claim
28
     * @return bool
29
     */
30
    public function check(Claim $claim);
31
32
    /**
33
     * remove claim from the white list
34
     *
35
     * @param Claim $claim
36
     * @return bool
37
     */
38
    public function remove(Claim $claim);
39
40
    /**
41
     * remove all claims associate to the subject from the white list
42
     *
43
     * @param Claim $claim
44
     * @return int
45
     */
46
    public function removeAll(Claim $claim);
47
48
}