PHP Classes

PHP Commission Calculator: Calculate commissions on currency transactions

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 51 All time: 10,692 This week: 206Up
Version License PHP version Categories
currency-calculator- 1.0.0MIT/X Consortium ...5PHP 5, Files and Folders, Finances, C...
Description 

Author

This package can calculate commissions on currency transactions.

It can read amounts from a set of currency transactions from a CSV file.

The package can process the transaction values and output to the command line console the amounts of the associated commissions earned for each transaction.

Innovation Award
PHP Programming Innovation award nominee
April 2022
Number 6
Many people work in the currency exchange market, trading money amounts between different currencies.

Each exchange transaction has associated commissions paid to the dealers that perform the transaction.

This package can automate the calculations of the commission amounts involved in a set of currency exchange transactions.

Manuel Lemos
Picture of Niko Peikrishvili
  Performance   Level  
Innovation award
Innovation award
Nominee: 4x

 

Documentation

Home assigment Commission Calculator

Installation

1) clone the repository 2) navigate to project folder 3) run `composer install` 4) copy .env.example as .env 5) run (optional) `php artisan config:cache`

Running

php artisan calculate:commission input.csv

Output

0.60
3.00
0.00
0.06
1.50
0
0.70
0.30
0.30
3.00
0.00
0.00
8612

Run test

php artisan test

Code styles

PHPStan

./vendor/bin/phpstan analyze 

if necessary add memory limit

./vendor/bin/phpstan analyze --memory-limit=1G

PHPCs

 ./vendor/bin/phpcs

  Files folder image Files (86)  
File Role Description
Files folder imageapp (6 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (16 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (3 files)
Files folder imageresources (3 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file input.csv Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpcs.xml Data Auxiliary data
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:51
This week:0
All time:10,692
This week:206Up