florianwolters/code-kata

A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

dev-master 2015-06-02 17:53 UTC

This package is not auto-updated.

Last update: 2024-12-17 02:33:29 UTC


README

Build Status Build Status Latest Stable Version Latest Unstable Version

FlorianWolters\CodeKata provides code kata implementations in the PHP programming language.

Table of Contents (ToC)

Introduction

A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

Currently, the project contains the following code katas:

  • TheFizzBuzzKata
  • ThePrimeFactorsKata I've modified the original ThePrimeFactorsKata from Robert C. Martin (Uncle Bob) as follows:
    • My solution validates the specified argument.
    • I do not refactor the two while-loops into two for-loops, since the code looks more complicated then.
  • TheBowlingGameCata I've modified the original TheBowlingGameCata from Robert C. Martin (Uncle Bob) as follows:
    • My solution uses validation, whenever required. Note: Correct validation for the allowed number of rolls is currently missing.
    • My solution uses a constant instead of the magic number 10 for the number of pins.
    • The private method rollStrike has been moved from the test class to the implementation class and its visibility was changed to public.
    • The private method sumOfBallsInFrame has been renamed to sumOfPinsInFrame.
    • Prefix incrementation (++$i) is used instead of postfix incrementation ($i++), where applicable.
    • The method names of the test cases have been renamed to reflect their actual goal.

Features

  • Artifacts tested with both static and dynamic test procedures:
  • Follows the PSR-0 requirements for autoloader interoperability.
  • Follows the PSR-1 basic coding style guide.
  • Follows the PSR-2 coding style guide.
  • Follows the Semantic Versioning Specification (SemVer) 2.0.0-rc.1.

Requirements

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://gnu.org/licenses/lgpl.txt.