Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get a specified value in the access token #888

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

get a specified value in the access token #888

wants to merge 2 commits into from

Conversation

hendeavors
Copy link
Contributor

Provide the ability to get a value from the access token by the offset.

Before:

$value = $token->getValues()['some_offset'] ?? null;

After:

$value = $token->getValue('some_offset');

@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #888 (96c80fc) into master (77def43) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              master      #888   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       180       185    +5     
===========================================
  Files             20        20           
  Lines            464       472    +8     
===========================================
+ Hits             464       472    +8     
Impacted Files Coverage Δ
src/Token/AccessToken.php 100.00% <100.00%> (ø)

Comment on lines +217 to +219
if (!(is_string($offset) || is_numeric($offset))) {
throw new InvalidArgumentException("Values offset must be a string or int");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of this check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants