Skip to content

Commit

Permalink
Build: (0084336) fix: Remove redundant Cache getItem() call in `Aut…
Browse files Browse the repository at this point in the history
…h0\SDK\Token\Verifier::getKeySet()` (#669)

* Remove unnecessary second getItem call

$item (although with an empty value) has already been created on line 198: https://github.com/auth0/auth0-PHP/blob/main/src/Token/Verifier.php#L198. We only have to save the value and expiry here.

This change will only (try) to get the value of the cache once instead of twice.

* fix: Variable scope

Co-authored-by: Evan Sims <evan.sims@okta.com>
  • Loading branch information
evansims and evansims committed Nov 7, 2022
1 parent ad6aba0 commit 6729a8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/Auth0-SDK-Token-Verifier.html
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ <h4 class="phpdocumentor-element__name" id="method_freeKey">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Token/Verifier.php"><a href="files/src-token-verifier.html"><abbr title="src/Token/Verifier.php">Verifier.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">280</span>
<span class="phpdocumentor-element-found-in__line">281</span>

</aside>

Expand Down Expand Up @@ -855,7 +855,7 @@ <h4 class="phpdocumentor-element__name" id="method_getKey">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/Token/Verifier.php"><a href="files/src-token-verifier.html"><abbr title="src/Token/Verifier.php">Verifier.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">248</span>
<span class="phpdocumentor-element-found-in__line">249</span>

</aside>

Expand Down

0 comments on commit 6729a8d

Please sign in to comment.