Harir Al-Rubaye, Nour Tayem, Thulasi Jothiravi, Rehan Nagoor Mohideen, Harikrishan Singh, and Ivan Odiel Magtangob
- Description
- Visuals
- Requirements
- Installation
- Usage (Local Development)
The majority of Sprint 2 was spent brainstorming what games to add into the website. The team ended up choosing to create our implementation of the "Where's Waldo" game.
The site has been updated to support navigation to a new game page where Where's Waldo can be played. Basic functionalities like a scoring system and game over screen have been implemented.
Other updates include:
- Added an Instructions page
- Added PHP linting as a part of the CI/CD pipeline
Landing Page - part 1 | landing Page - part 2 |
---|---|
![]() |
![]() |
Game Start Page | Game Page |
---|---|
![]() |
![]() |
Instructions Page | About Us Page |
---|---|
![]() |
![]() |
- Install Docker engine: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
- Install Docker Desktop: https://www.docker.com/products/docker-desktop/
- Go to the page of the repository that you want to clone (sprint-2 branch)
- Click on “Clone or download” and copy the URL.
- Use the git clone command along with the copied URL from earlier.
- Run the following on the command line:
$ git clone --branch sprint-2 https://github.com/USERNAME/REPOSITORY
- Press Enter.
- Pull branch sprint-2
- Make sure your docker engine is running (by launching docker)
- Run:
make
which will run thedocker compose up
and nginx/php will run on localhost:8000 - Run:
make down
: which will rundocker compose down
and close the docker enviroment [After you are done]
- Access the web application at the following URL: http://localhost:8000/
Research for CodeSniffer by Ivan Odiel Magtangob
- https://github.com/squizlabs/PHP_CodeSniffer
- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options
PHP_CodeSniffer is a set of two PHP scripts; the main phpcs
script that tokenizes PHP, JavaScript and CSS files to
detect violations of a defined coding standard, and a second phpcbf
script to automatically correct coding standard
violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
To avoid modifying the VM, the two PHP_CodeSniffer scripts were installed into the repository using curl
:
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
To use either script:
phpcs /path/to/code/myfile.php
phpcbf /path/to/code/myfile.php
PHP_CodeSniffer can be further configured to ignore certain warnings, enable coloured output messages, etc.. Settings
such as these can be implemented in a CodeSniffer.conf
file:
<?php
$phpCodeSnifferConfig = array (
'colors' => '1',
'ignore_warnings_on_exit' => '1',
);
?>
Some other configuration options can also be added within the PHP files to be linted, or specified in the command when executing the script. For example, to ignore all of a certain error:
phpcs --exclude=Generic.Files.LineEndings /path/to/code/myfile.php