Skip to content

Commit

Permalink
Minimalist docblock and fix some spacing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn authored and TimothyBJacobs committed Jan 25, 2024
1 parent caeae02 commit a06f8f4
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Telemetry/Events/Event_Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
class Event_Subscriber extends Abstract_Subscriber {

/**
* Holds the events in a non-persistent way.
*
* @since 2.3.1
*
* @var array
*/
private static $events = [];
Expand Down Expand Up @@ -107,11 +103,11 @@ public function send_events() {
$events = filter_input( INPUT_POST, 'events', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); // phpcs:ignore WordPressVIPMinimum.Security.PHPFilterFunctions.RestrictedFilter

if ( empty( $events ) ) {
return;
return;
}

if ( ! is_array( $events ) ) {
$events = (array) $events;
$events = (array) $events;
}

$this->container->get( Event::class )->send_batch( $events );
Expand Down

0 comments on commit a06f8f4

Please sign in to comment.