asn1
asn1 copied to clipboard
Fix false positive when parsing with PHP_CodeSniffer
Hi, we run PHP_CodeSniffer (phpcs) across our codebase and one of the projects in our codebase uses your asn1 library.
phpcs is throwing a PHPCompatibility.Miscellaneous.ValidIntegers.HexNumericStringFound notice for a small part of your code.
After reading up about this notice here: https://www.zend.com/php-migration/misc/hex-numeric-string
It looks like this is a false positive, so what I've done in this PR is add a rule to disable this specific notice from phpcs. See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file
Let me know if you have any questions.
Coverage remained the same at 99.848% when pulling 0ddc1da846cc8d445d38ec6244f6d0d3bb106287 on r-a-y:fix/phpcs into 074efe8f7c353c54edc809ac3d74efda83edd776 on sop:master.
I opened an issue for this: https://github.com/PHPCompatibility/PHPCompatibility/issues/1345