Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1.48 KB

File metadata and controls

39 lines (21 loc) · 1.48 KB

Affiliate Window Candidate Task

Objective

To demonstrate your OOP and unit testing skills.

Task

Create a simple report that shows transactions for a merchant id specified as command line argument.

The data.csv file contains dummy data in different currencies, the report should be in GBP.

Assume that data changes and comes from a database, csv file is just for simplicity, feel free to replace with sqlite if that helps.

Please add code, unit tests and documentation (docblocks, comments). You do not need to connect to a real currency webservice, a dummy webservice client that returns random or static values is fine.

Provided code is just an indication, do not feel the need to use them if you don't want to. If something is not clear, improvise.

Use any 3rd party framework or components as you see fit. Please use composer where possible if depending on 3rd party code.

Assessment

Your task will be assessed on your use of OOP, dependency injection, unit testing and commenting against the level of the position for which you have applied.

Points will be deducted for leaving any redundant files in your code (e.g. left overs from framework skeleton app creation).

Usage

To launch the script, just hit in you shell command: php report.php myfile.csv merchantiD.

Example

I want to display the transaction of the merchant Id number 2: php scripts/report.php ../data.csv 2.

Composer

Use only php composer.phar to install all third libraries.