Completed
Push — try/capabilities ( 5ae69f )
by
unknown
53:59 queued 47:44
created

WPCapabilityRule::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Automattic\Jetpack\Capabilities;
4
5
class WPCapabilityRule {
6
	private $wp_capability;
7
8
	function __construct( $wp_capability ) {
9
		$this->wp_capability = $wp_capability;
10
	}
11
12
	function check( $object_id = null ) {
13
		return current_user_can( $this->wp_capability, $object_id );
14
	}
15
}
16