FlorianWolters\CodeKata
, (*1)
| Period of Time |
Number of Downloads |
| Total |
 |
| Monthly |
 |
| Daily |
 |
FlorianWolters\CodeKata provides code kata implementations in the [PHP][17] programming language., (*2)
Table of Contents (ToC)
Introduction
A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition., (*3)
Currently, the project contains the following code katas:, (*4)
- 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:
- Dynamic component tests (unit tests) implemented using [PHPUnit][19].
- Static code analysis performed using the following tools:
- [PHP_CodeSniffer][14]: Style Checker
- [PHP Mess Detector (PHPMD)][18]: Code Analyzer
-
phpcpd: Copy/Paste Detector (CPD)
-
phpdcd: Dead Code Detector (DCD)
- 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][20] 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., (*5)
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., (*6)
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., (*7)