Completed
Push — try/capabilities ( eb7fe7...7f65a9 )
by
unknown
40:05 queued 32:52
created

JetpackPlanRule::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Automattic\Jetpack\Capabilities;
4
5
class JetpackPlanRule implements Rule {
6
	private $plan_slug;
7
8
	function __construct( $plan_slug ) {
9
		$this->plan_slug = $plan_slug;
10
	}
11
12
	function check( ...$args ) : bool {
13
		$plan = Jetpack_Plan::get();
14
		if ( $this->plan_slug === $plan['product_slug'] ) {
15
			return true;
16
		} else {
17
			return false;
18
		}
19
	}
20
}
21