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

chore: BlocksAnalyzer - raise exception on invalid index #7819

Merged
merged 10 commits into from Feb 9, 2024
Merged

Conversation

keradus
Copy link
Member

@keradus keradus commented Feb 4, 2024

@kubawerlos , in context of our discussoin in #7804 . I think this is last Analyser to be updated.

@coveralls
Copy link

coveralls commented Feb 4, 2024

Coverage Status

coverage: 94.779% (-0.001%) from 94.78%
when pulling 17c3b52 on block
into 4f36a12 on master.

if (!$tokens->offsetExists($openIndex)) {
return false;
throw new \InvalidArgumentException(sprintf('Token open index %d does not exist.', $openIndex));
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be like this?

Suggested change
throw new \InvalidArgumentException(sprintf('Token open index %d does not exist.', $openIndex));
throw new \InvalidArgumentException(sprintf('Block open index %d does not exist.', $openIndex));

"Token open index" looks weird 🤔.

@keradus keradus enabled auto-merge (squash) February 9, 2024 22:04
@keradus keradus merged commit c1a9344 into master Feb 9, 2024
46 checks passed
@keradus keradus deleted the block branch February 9, 2024 22:15
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.

None yet

3 participants