-
Notifications
You must be signed in to change notification settings - Fork 11
Little re-factoring #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…fine return types
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I've re-factored a bit your classes to fit PSR1/PSR2 standards (class per file, added namespaces), added a composer.json file (please, fix the "name", if you accept the change). Also I've added some tests according to project description to make development of library easier. More over, I've added hpUnit, php code sniffer, php code style fixer and php mess detector as development requirements.
To install dependencies jus clone/update the project and run:
php -f composer.phar install
in command line.To run code sniffer run:
./vendor/bin/phpcs --standard=PSR1,PSR2 ./src/
in command line.To run code style fixer run:
./vendor/bin/php-cs-fixer fix ./src/ --level=all
in command line.To run mess detector run:
vendor/bin/phpmd src/ text codesize,controversial,design,naming,unusedcode
in command line. I'm not sure we need to obey to all phpmd rules, but you might be interested, but if you are not - just ignore it.