Skip to content

Commit

Permalink
Update PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovett1 committed Jun 15, 2024
1 parent 2f3b74e commit a50ab99
Show file tree
Hide file tree
Showing 7 changed files with 343 additions and 108 deletions.
6 changes: 3 additions & 3 deletions 10up-experience.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@

require_once __DIR__ . '/includes/utils.php';

add_filter('https_ssl_verify', '__return_false');
add_filter( 'https_ssl_verify', '__return_false' );

spl_autoload_register(
function( $class_name ) {
function ( $class_name ) {
$path_parts = explode( '\\', $class_name );

if ( ! empty( $path_parts ) ) {
Expand Down Expand Up @@ -87,7 +87,7 @@ function( $class_name ) {
*/
add_action(
'plugins_loaded',
function() {
function () {
Authentication\Passwords::instance();
SSO\SSO::instance();
}
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
"bjeavons/zxcvbn-php": "^1.0"
},
"require-dev": {
"10up/phpcs-composer": "dev-master",
"squizlabs/php_codesniffer": "3.*"
"10up/phpcs-composer": "dev-trunk"
},
"scripts": {
"lint": "phpcs --extensions=php --warning-severity=8 -s .",
Expand Down
424 changes: 333 additions & 91 deletions composer.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion includes/classes/AdminCustomizations/Customizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ public function add_about_menu( $wp_admin_bar ) {
)
);
}

}

/**
Expand Down
9 changes: 3 additions & 6 deletions includes/classes/Authentication/Passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class Passwords {

use Singleton;

/**
* Setup hooks
*
Expand Down Expand Up @@ -312,12 +313,8 @@ public function validate_strong_password( $errors, $user_data ) {
// User ID specified.
$enforce = $this->enforce_for_user( $user_id );

} else {

// No ID yet, adding new user - omit check for "weaker" roles.
if ( $role && in_array( $role, apply_filters( 'tenup_experience_weak_roles', array( 'subscriber' ) ), true ) ) {
$enforce = false;
}
} elseif ( $role && in_array( $role, apply_filters( 'tenup_experience_weak_roles', array( 'subscriber' ) ), true ) ) {
$enforce = false;
}

// Enforce?
Expand Down
2 changes: 1 addition & 1 deletion includes/classes/Authors/Authors.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function maybe_disable_author_archive() {
// Perform partial match on domains to catch subdomains or variation of domain name
$filtered_domains = array_filter(
$whitelisted_domains,
function( $domain ) use ( $current_domain ) {
function ( $domain ) use ( $current_domain ) {
return false !== stripos( $current_domain, $domain );
}
);
Expand Down
6 changes: 2 additions & 4 deletions includes/classes/SupportMonitor/Monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ public function register_settings() {
'tenup_support_monitor'
);
}

}

/**
Expand Down Expand Up @@ -531,8 +530,8 @@ public function send_request( $messages ) {
}

$body = [
'message' => wp_json_encode( $messages ),
'url' => TENUP_EXPERIENCE_IS_NETWORK ? network_home_url() : home_url(),
'message' => wp_json_encode( $messages ),
'url' => TENUP_EXPERIENCE_IS_NETWORK ? network_home_url() : home_url(),
];

$request_message = [
Expand All @@ -556,7 +555,6 @@ public function send_request( $messages ) {
$messages,
wp_remote_retrieve_response_code( $response )
);

}

/**
Expand Down

0 comments on commit a50ab99

Please sign in to comment.