Imagine a universe with:
- an infinite amount of balls, each of them with a number (from 1 to 999) on it (so we have an infinite amount of balls #1, an infinite amount of balls #2 etc.) 30 baskets, each with a space for 10 balls our dear user has his own, special basket with space for 100 balls Now, what happens is:
- we fill each basket with a random amount (no higher than the basket’s capacity, higher than zero) of unique balls (so there is no basket with two balls #8, but ball #8 can be in many baskets)
- the user also fills his basket with a random amount of unique balls (same rules apply)
- recreate the above scenario
- find baskets, that have only balls owned by the user
- find baskets, that have exactly one ball owned by the user This task is your best opportunity to showcase your skills and impress us, so proceed wisely.
- PHP 5.5+ (entire app tested on PHP 5.6, but should also work on 5.5 and 7.0)
composer install
- application:
php bin/index.php
. It starts up WebSocket server onlocalhost:8000
. You can use a sample client fromclient/client.html
to work with the server: just open the page in browser (tested in Chrome). - tests:
php vendor/bin/phpunit --bootstrap vendor/autoload.php test
- phpcs:
vendor/bin/phpcs src
- phpmd:
vendor/bin/phpmd src text cleancode
This is a WebSocket server backend built using Ratchet
[] (https://www.youtube.com/watch?v=B_3TlrZLpQ0 "Project name inspiration")