Skip to content

Commit

Permalink
Phpcs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn committed Nov 7, 2023
1 parent 7ecdb2d commit dd7b2be
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 15 deletions.
1 change: 0 additions & 1 deletion .env.testing.slic
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ TEST_SITE_WP_URL=http://wordpress.test
TEST_SITE_WP_DOMAIN=wordpress.test
[email protected]

# We're using Docker to run the tests.
USING_CONTAINERS=1
2 changes: 0 additions & 2 deletions src/Telemetry/Admin/Admin_Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Admin_Subscriber extends Abstract_Subscriber {
*/
public function register(): void {
add_action( 'admin_init', [ $this, 'maybe_enqueue_admin_assets' ] );

}

/**
Expand Down Expand Up @@ -59,5 +58,4 @@ public function maybe_enqueue_admin_assets() {
$this->container->get( Resources::class )->enqueue_admin_assets();
}
}

}
1 change: 0 additions & 1 deletion src/Telemetry/Admin/Resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,4 @@ public function enqueue_styles() {
public static function get_asset_path(): string {
return plugin_dir_url( dirname( __DIR__ ) );
}

}
1 change: 0 additions & 1 deletion src/Telemetry/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,4 @@ public static function add_stellar_slug( string $stellar_slug, string $wp_slug =
public static function set_server_url( string $url ) {
static::$server_url = $url;
}

}
1 change: 0 additions & 1 deletion src/Telemetry/Contracts/Abstract_Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ abstract class Abstract_Subscriber implements Subscriber_Interface {
public function __construct( ContainerInterface $container ) {
$this->container = $container;
}

}
1 change: 0 additions & 1 deletion src/Telemetry/Contracts/Subscriber_Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ interface Subscriber_Interface {
* @return void
*/
public function register();

}
4 changes: 2 additions & 2 deletions src/Telemetry/Data_Providers/Debug_Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public function get_data(): array {
*
* @return array<string,mixed> Filtered Site Health data.
*/
public function clean_private_data ( $data ): array {
public function clean_private_data( $data ): array {
foreach ( $data as &$details ) {
// remove private info.
$details['fields'] = array_filter(
$details['fields'],
function( $field ) {
function ( $field ) {
return empty( $field['private'] );
}
);
Expand Down
1 change: 0 additions & 1 deletion src/Telemetry/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,4 @@ protected function get_url() {
*/
return apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'events_url', $events_url );
}

}
2 changes: 0 additions & 2 deletions src/Telemetry/Exit_Interview/Exit_Interview_Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use StellarWP\Telemetry\Contracts\Abstract_Subscriber;
use StellarWP\Telemetry\Config;
use StellarWP\Telemetry\Core;
use StellarWP\Telemetry\Opt_In\Status;
use StellarWP\Telemetry\Telemetry\Telemetry;

Expand Down Expand Up @@ -161,5 +160,4 @@ public function plugin_action_links( $links, $plugin_file ) {

return array_merge( $before_deactivate, $after_deactivate );
}

}
1 change: 0 additions & 1 deletion src/Telemetry/Exit_Interview/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use StellarWP\Telemetry\Admin\Resources;
use StellarWP\Telemetry\Config;
use StellarWP\Telemetry\Contracts\Template_Interface;
use StellarWP\Telemetry\Core;

/**
* The primary class for rendering the "Exit Interview" modal on plugin deactivation.
Expand Down
1 change: 0 additions & 1 deletion src/Telemetry/Last_Send/Last_Send.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,4 @@ public function get_timestamp() {

return $result;
}

}
2 changes: 1 addition & 1 deletion src/Telemetry/Opt_In/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function get() {

$status = self::STATUS_INACTIVE;
$option = $this->get_option();
$plugins = isset( $option['plugins'] ) ? $option['plugins'] : [];
$plugins = $option['plugins'] ?? [];

if ( count( $plugins ) === 0 ) {
$status = self::STATUS_INACTIVE;
Expand Down

0 comments on commit dd7b2be

Please sign in to comment.