Skip to content

Commit

Permalink
Fixed PHPCS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GiuseppeArcifa committed Nov 15, 2024
1 parent 3f42d76 commit 6be0969
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/Helpers/Transient.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public static function get( string $key ) {
}

/**
* @var array{value:mixed, expires_at:int} $data The saved value and the Unix time it expires at.
* The saved value and the Unix time it expires at.
*
* @var array{value:mixed, expires_at:int} $data
*/
$data = \get_option( $key );
if ( is_array( $data ) && isset( $data['expires_at'], $data['value'] ) ) {
Expand Down Expand Up @@ -125,7 +127,7 @@ public static function delete( $key ): bool {
*/
public function __call( $name, $arguments ) {
if ( ! method_exists( __CLASS__, $name ) ) {
throw new \BadMethodCallException( "Method $name does not exist" );
throw new \BadMethodCallException( "Method " . esc_html( $name ) . " does not exist" );
}
return self::$name( ...$arguments );
}
Expand Down

0 comments on commit 6be0969

Please sign in to comment.