Completed
Push — develop ( 034857...1b157a )
by Christian
8s
created

SilverstripePermission   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isAdmin() 0 3 1
1
<?php
2
3
namespace Ntb\RestAPI;
4
5
/**
6
 * Implements the IPermission interface and uses the Silverstripe permission system.
7
 * @author Christian Blank <[email protected]>
8
 */
9
class SilverstripePermission implements IPermissionChecks {
10
11
    /**
12
     * @param \Member $member
13
     * @return bool
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean|string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
14
     */
15
    public function isAdmin($member) {
16
        return \Permission::checkMember($member, 'ADMIN');
17
    }
18
}