Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed May 14, 2024
1 parent e1da152 commit 6471660
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions includes/StagingFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ class StagingFeature extends \NewfoldLabs\WP\Module\Features\Feature {
* @var string
*/
protected $name = 'staging';
protected $value = true; // default to on

/**
* Initialize staging feature
* The feature value. Defaults to on.
*
* @var boolean
*/
protected $value = true;

/**
* Initialize staging feature.
*/
public function initialize() {
if ( function_exists( 'add_action' ) ) {
Expand All @@ -37,4 +42,4 @@ function () {
);
}
}
}
}
6 changes: 3 additions & 3 deletions includes/StagingFeatureHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function hooks() {
* @param boolean $value the value
* @return boolean the filtered value
*/
function filterValue( $value ) {
public function filterValue( $value ) {
if ( $this->shouldDisable() ) {
$value = false;
}
Expand All @@ -48,7 +48,7 @@ function filterValue( $value ) {
*
* @return void
*/
function maybeDisable() {
public function maybeDisable() {
if ( $this->shouldDisable() ) {
disableFeature( 'staging' );
}
Expand All @@ -59,7 +59,7 @@ function maybeDisable() {
*
* @return boolean whether the feature should be disabled
*/
function shouldDisable() {
public function shouldDisable() {
// check for atomic context
return 'atomic' === getContext( 'platform' );
}
Expand Down

0 comments on commit 6471660

Please sign in to comment.