Your contribution is welcome!
Before proposing a pull request, check the following:
- Your code should follow the PSR-1,PSR-2 and PSR-4 (and use php-cs-fixer to fix inconsistencies).
- Unit tests should still pass after your patch
- As much as possible, add unit tests for your code
- If you commit a new feature, be prepared to help maintaining it. Watch the project on GitHub, and please comment on issues or PRs regarding the feature you contributed.
Once your code is merged, it is available for free to everybody under the MIT License. Publishing your Pull Request on this GitHub repository means that you agree with this license for your contribution.
Thank you for your contribution!
-
Receive the lists
php open_list.php receive
-
Process the lists
php open_list.php process
- Add the info to the config file of the lists
- Execute the Receiver, it should make the folder and download the list.
php src/OpenList/Receiver.php
- Create a new parser inside of the folder parsers and implements the IList interface
- Execute the Processor and check it works
php src/OpenList/Processor.php
- Create tests for that parsers
- (Optional) Create a helper to create the same sanction file with fake content (Check helpers folder). And execute the helper, in case of the Ofac list is
php src/OpenList/helpers/OfacCreator.php
-
Php cs fixer
php vendor/fabpot/php-cs-fixer/php-cs-fixer fix src
-
Check the code with codesniffer
php vendor/squizlabs/php_codesniffer/scripts/phpcs src
-
Execute tests
php vendor/phpunit/phpunit/phpunit
Or execute a particular test with --filter, example:php vendor/phpunit/phpunit/phpunit --filter Usofac*
*Xdebug must be enabled for the coverage detail