https://github.com/davidjeddy/chicken-challenge
Create a chicken using limited external dependencies.
https://github.com/davidjeddy/chicken-challenge
Last synced: 2 days ago
JSON representation
Create a chicken using limited external dependencies.
- Host: GitHub
- URL: https://github.com/davidjeddy/chicken-challenge
- Owner: davidjeddy
- Created: 2016-10-05T23:22:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-31T21:20:52.000Z (almost 3 years ago)
- Last Synced: 2025-01-16T11:32:37.217Z (5 months ago)
- Language: PHP
- Homepage: https://github.com/davidjeddy/chicken-challenge
- Size: 57.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
Chicken Challenge# Requirements
Create a PHP class or classes that instantiate an object that represents
a chicken (the animal). Your chicken class should demonstrate understanding
of object oriented programming principles including (but not limited to)
- inheritance
- encapsulation
- single-responsibility.
Your chicken must be able to be run through a PHP interpreter without any
external dependencies. It should follow PSR-2 standards and include unit
tests.# Assumptions
- PHP, GiT, Terminal are accessible
- Composer can be used to generate the application class auto loader
- Composer can be used to check PHP minimal requirements
- Minimal 3rd part library usage, should not be core of demo
# Badges
[](https://packagist.org/packages/davidjeddy/chicken-challenge)
[](https://packagist.org/packages/davidjeddy/chicken-challenge)
[](//packagist.org/packages/davidjeddy/chicken-challenge)
[](https://packagist.org/packages/davidjeddy/chicken-challenge)
[](https://packagist.org/packages/davidjeddy/chicken-challenge)
[](https://packagist.org/packages/davidjeddy/chicken-challenge)
[](https://packagist.org/packages/davidjeddy/chicken-challenge)[](https://insight.sensiolabs.com/projects/d12edf84-11de-4efc-a7bf-fa3b17d19114)
# Installation
cd {project root}
git clone# VM / Container services
IF Vagrant is available:
vagrant up
vagrant ssh
IF docker is available (very early alpha, YMMV)docker-compose up --build
docker exec -it chickenchallenge_app_1 bash
apt-get update && apt-get install wget* Run the application commands inside the container
# Install dependencieswget http://getcomposer.org/composer.phar
php composer.phar install --profile --prefer-dist -o
# Running the app
Change directory to the root of the projectphp ./index.php
# Testing
Testing requires PHPUnit, easiest way to get PHPUnit is via composercd {project root}
wget https://phar.phpunit.de/phpunit.phar
php ./vendor/bin/phpunit ./tests
# Coding styleTo ensure PSR-2 compliant occasionally run the following
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --standard=PSR2 --ignore="*/vendor/*","*/sapi/*" --report-diff=./PSR2.diff ./
patch -p0 -ui ./PSR2.diff
# Auto Generating Documentation
wget http://phpdoc.org/phpDocumentor.phar
php phpDocumentor.phar -p -t ./sapi -d ./src* Note: GraphViz is required to generate inheritance tree visuals.