Commit graph

14 commits

Author SHA1 Message Date
Henrique Moody
258a456eec
Setup PHPStan (PHP Static Analysis Tool)
Require "phpstan/phpstan" for development and add to the Travis CI
configuration file to execute the analysis when Travis executes the
build with the version 7.2 of PHP.

The level of the configuration is very week for now (just "1") and still
quite some changes had to be made in order to make the analysis pass. I
hope it does not take much time to increase the level of the strictness
of the analyses.

I tried to configure that before but because of dependencies with
"symfony/validator" it was not possible.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2018-08-22 19:10:20 +02:00
William Espindola
8bd7428fe1
Apply contribution guidelines to "CreditCard" rule
Co-Authored-By: Henrique Moody <henriquemoody@gmail.com>
2018-06-15 22:12:17 +02:00
Henrique Moody
fe3654b270
Improve RuleTestCase class
- Add documentation to the class and its methods;
- Move RuleTestCase to Test namespace;
- Use PHP 7 type hinting;
- Rename getRuleMock() to createValidatableMock().
2018-01-07 14:32:05 +01:00
Henrique Moody
ef975629f3
Changes on PHP-CS-Fixer configuration
Because of `declare(strict_types=1)` some changes were necessary.
2018-01-04 17:59:37 +01:00
Henrique Moody
fa030637cc
Fix wrong call to PHPUnit assertions
The assertion methods are all static, therefore they should be called
with self::assert* instead of $this->assert*.
2017-11-12 14:35:19 +01:00
Gabriel Caruso
93ce9cb93a
Updated to PHPUnit 6 2017-11-12 14:22:22 +01:00
Henrique Moody
d67394cd39
Escape fully qualified class names 2017-02-04 14:01:14 +01:00
Andy Snell
94a79c033a
Update MasterCard BIN Range
Updates the CreditCard validator regex for the MasterCard brand to match 16-digit card numbers starting with 22 - 27.  Additionally, updates the unit test for CreditCard with a published test card in the new BIN range.

Additional information on the BIN range update can be found at: https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html
2016-12-04 23:56:43 -05:00
Henrique Moody
6f5c623926
Use class constant instead of FQCN 2016-10-30 20:16:13 +01:00
Henrique Moody
46541c7e46 Allow the define brands for credit card validation 2016-04-06 16:42:49 -03:00
Henrique Moody
9c49dd3bcf Use short array syntax 2015-10-17 22:56:32 -03:00
Henrique Moody
3e45647b81 Make all rules mandatory 2015-10-07 01:00:39 -03:00
Henrique Moody
757c3776af Add @covers and @group rule on rule tests 2015-08-16 15:00:05 -03:00
Henrique Moody
02a1923eb5 Move unit tests to "tests/unit" 2015-08-11 13:36:25 -03:00
Renamed from tests/Rules/CreditCardTest.php (Browse further)