Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Feb 3, 2024

Description

This commit adds the new sniff as introduced in #197 by @TimWolla to the PHPCS native ruleset and fixes the few conditions which were ambiguous in this codebase.

Suggested changelog entry

N/A

Related issues/external references

Also see #197

…ative ruleset

This commit adds the new sniff as introduced in 197 by TimWolla to the PHPCS native ruleset and fixes the few conditions which were ambiguous in this codebase.
|| (stripos($newContent, '0o') === 0 && octdec(str_replace('_', '', $newContent)) > PHP_INT_MAX)
|| (stripos($newContent, '0x') !== 0
&& stripos($newContent, 'e') !== false || strpos($newContent, '.') !== false)
&& (stripos($newContent, 'e') !== false || strpos($newContent, '.') !== false))
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless it's too early in the morning and I misread this, it even caught a bug in here 🙌

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought so too when I made the change, but there is a test for this code and it passed before and after 🤷🏻‍♀️

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

Successfully merging this pull request may close these issues.

2 participants