Skip to content

Commit

Permalink
update method declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Dec 17, 2024
1 parent a7faa87 commit 7806568
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/Engine/Media/Fonts/FontsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ protected function get_exclusions(): array {
}

/**
* Checks if a URL is excluded based on the provided exclusions.
* Checks if a font is excluded based on the provided exclusions.
*
* @param string $url The URL to check.
* @param string $subject The string to check.
* @param string[] $exclusions The list of exclusions.
*
* @return bool True if the URL is excluded, false otherwise.
*/
protected function is_excluded( string $url, array $exclusions ): bool {
protected function is_excluded( string $subject, array $exclusions ): bool {
// Bail out early if there are no exclusions.
if ( empty( $exclusions ) ) {
return false;
Expand All @@ -53,6 +53,6 @@ function ( $exclusion ) {
$exclusions_str = implode( '|', $escaped_exclusions );

// Check the URL against the combined regex pattern.
return (bool) preg_match( '#(' . $exclusions_str . ')#i', $url );
return (bool) preg_match( '#(' . $exclusions_str . ')#i', $subject );
}
}

0 comments on commit 7806568

Please sign in to comment.