The task: https://github.com/jiminny/join-the-team/blob/master/backend-task.md
Checkout the repo and run composer install
To run OOP solution execute:
php analyzer.php
To run non-OOP solution execute:
php analyzer-poc.php
Execute ./test.sh
Included tests:
- test for PSR2
- test for PHP mess (phpmd)
- Unit tests
The value of user_talk_percentage
cannot be relied with the current data.
The reason is that there are too much overlapping times between user
and customer
.
E.g.:
The latest point in the dataset is at 1856.77 seconds.
But the sum of the durations of user and customer talk is 2222.89
(the user has talked totally 1357.45 seconds, and the customer - 865.44 seconds).
So if we assume (as per task description) that the whole call duration is 1856.77 seconds, this gives us user_talk_percentage
= 73.11%, which doesn't looks correct.