SilverstripePermission::isAdmin()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
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
}