Period of Time | Number of Downloads |
---|---|
Total | |
Monthly | |
Daily |
FlorianWolters\CodeKata provides code kata implementations in the PHP programming language.
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 twofor
-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
methodrollStrike
has been moved from the test class to the implementation class and its visibility was changed topublic
. - The
private
methodsumOfBallsInFrame
has been renamed tosumOfPinsInFrame
. - 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.
- Artifacts tested with both static and dynamic test procedures:
- Dynamic component tests (unit tests) implemented using PHPUnit.
- Static code analysis performed using the following tools:
- PHP_CodeSniffer: Style Checker
- PHP Mess Detector (PHPMD): 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 Specification (SemVer) 2.0.0-rc.1.
- PHP >= 5.4
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.