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

SilverstripePermission::isAdmin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 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
}