Skip to content

Commit

Permalink
PHPCS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anubisthejackle committed Feb 29, 2024
1 parent 4d9d707 commit 5ee3bbb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"scripts": {
"phpcs": "vendor/bin/phpcs",
"phpcbf": "vendor/bin/phpcbf",
"phpunit": "vendor/bin/phpunit"
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions php/class-fieldmanager-field.php
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ public function presave_all( $values, $current_values ) {
function( $value ) {
if ( is_array( $value ) ) {
return ! empty( $value );
} elseif( null === $value ) {
} elseif ( null === $value ) {
return $value;
} else {
return strlen( $value );
Expand Down Expand Up @@ -1119,7 +1119,7 @@ public function presave( $value, $current_value = array() ) {
);
}
}
return (null !== $value) ? call_user_func( $this->sanitize, $value ) : null;
return ( null !== $value ) ? call_user_func( $this->sanitize, $value ) : null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion php/class-fieldmanager-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public function presave( $values, $current_values = array() ) {
}
} elseif ( null === $values[ $element->name ] ) {
unset( $values[ $element->name ] );
} elseif ( !strlen( $values[ $element->name ] ) ) {
} elseif ( ! strlen( $values[ $element->name ] ) ) {
unset( $values[ $element->name ] );
}
}
Expand Down
2 changes: 1 addition & 1 deletion php/datasource/class-fieldmanager-datasource-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Fieldmanager_Datasource_Post extends Fieldmanager_Datasource {
*
* @var mixed
*/
private $_fragment;
private $_fragment; // phpcs:ignore PSR2.Classes.PropertyDeclaration.Underscore

/**
* Construct the object.
Expand Down

0 comments on commit 5ee3bbb

Please sign in to comment.