Skip to content

Commit

Permalink
Update SiteGenService.php
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Nov 24, 2023
1 parent 9709623 commit 36a337f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions includes/Services/SiteGenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
/**
* Class SiteGenService
*
* Class for handling SiteGen interactions.
* Class for handling SiteGen Interactions.
*/
class SiteGenService {

/**
* Determines whether the given identifier is valid.
* Gets Valid Identifiers.
*
* @param string $key The identifier to be evaluated.
* @return boolean
*/
public static function is_identifier( $key ) {
$identifiers = array(
public static function get_identifiers() {
return array(
'siteclassification' => true,
'targetaudience' => true,
'contenttones' => true,
Expand All @@ -29,8 +29,16 @@ public static function is_identifier( $key ) {
'pluginrecommendation' => true,
'fontpair' => true,
);
}

return isset( $identifiers[ $key ] );
/**
* Determines whether the given identifier is valid.
*
* @param string $key The identifier to be evaluated.
* @return boolean
*/
public static function is_identifier( $key ) {
return isset( self::get_identifiers()[ $key ] );
}

/**
Expand Down

0 comments on commit 36a337f

Please sign in to comment.