Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Current_User_Admin | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| verify | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Automattic\Jetpack_Boost\REST_API\Permissions; |
| 4 | |
| 5 | use Automattic\Jetpack_Boost\REST_API\Contracts\Permission; |
| 6 | |
| 7 | class Current_User_Admin implements Permission { |
| 8 | |
| 9 | // $request is required to adhere to the contract. |
| 10 | //phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable |
| 11 | public function verify( $request ) { |
| 12 | return current_user_can( 'manage_options' ); |
| 13 | } |
| 14 | } |