Go to file
bmorg 34cbed2c9b
Allow leading zeros when using "IntVal" rule
There is some confusion about integer literals (as we type them into
source code) and integer values (the actual value they represent).

When casting the integer 08 (without quotes), PHP triggers an error as
integers starting with 0 should have base 8. However, when casting the
string '08' as an integer PHP returns the integer 8.

This commit will change the behavior of the "IntVal" rule, allowing it
to accept any integer type and any representation of an integer as a
string.

Reviewed-by: Emmerson Siqueira <emmersonsiqueira@gmail.com>
Reviewed-by: Wesley Victhor Mendes Santiago <w.v.mendes.s@gmail.com>
Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
2020-07-21 21:40:38 +02:00
.github/workflows Configure GitHub workflow to update top-level domains 2020-05-26 19:19:25 +02:00
bin Configure GitHub workflow to update top-level domains 2020-05-26 19:19:25 +02:00
data/iso_3166-2 Remove subdivision code rules per country 2019-04-06 23:05:24 +02:00
docs Allow leading zeros when using "IntVal" rule 2020-07-21 21:40:38 +02:00
library Allow leading zeros when using "IntVal" rule 2020-07-21 21:40:38 +02:00
tests Allow leading zeros when using "IntVal" rule 2020-07-21 21:40:38 +02:00
.docheader Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
.gitattributes Create ".gitattributes" file 2017-02-10 14:55:35 +01:00
.gitignore Set up "squizlabs/php_codesniffer" 2019-02-03 19:39:14 +01:00
.php_cs Enforce the use of "@covers" annotation 2018-07-23 21:37:38 +02:00
.scrutinizer.yml Migrate to new PHP Analysis 2018-01-09 16:19:27 +01:00
.travis.yml Change the PHP support to version 7.2 or aboce 2020-04-04 23:55:05 +02:00
CHANGELOG.md Remove documentation links in the repository 2019-05-23 16:16:00 +02:00
composer.json Change the PHP support to version 7.2 or aboce 2020-04-04 23:55:05 +02:00
CONTRIBUTING.md Update contribution guidelines 2019-05-23 16:35:41 +02:00
couscous.yml Add Google Analytics tracking ID to "couscous.yml" 2015-02-18 08:49:05 -02:00
LICENSE Turn LICENSE file into plain/text 2019-05-23 16:21:34 +02:00
mkdocs.yml Create MkDocs configuration file 2018-12-11 09:25:41 +01:00
phpcs.xml.dist Use "Respect" coding standard 2019-05-11 20:51:39 +02:00
phpstan.neon.dist Apply "phpstan/phpstan-deprecation-rules" rules 2019-05-05 15:18:09 +02:00
phpunit.xml.dist Remove subdivision code rules per country 2019-04-06 23:05:24 +02:00
README.md Remove current disclaimer about current stable version 2020-04-04 23:28:32 +02:00