Skip to content

Commit

Permalink
Simplify reliance on getMultiple()
Browse files Browse the repository at this point in the history
  • Loading branch information
dlh01 committed Dec 30, 2023
1 parent f7bdf24 commit d6ff981
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/alley/wp/simplecache/class-metadata-adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,7 @@ public static function for_term( int $term_id ): CacheInterface {
public function get( string $key, mixed $default = null ): mixed {
$get = $this->getMultiple( [ $key ], $default );

$out = $default;

foreach ( $get as $value ) {
$out = $value;
}

return $out;
return $get[ $key ];
}

/**
Expand Down

0 comments on commit d6ff981

Please sign in to comment.