First of all, thank you for considering contributing. Go team!
Here are a few rules I'd like you to follow when contributing (because I try to):
- Follow PHP Standards Recommendations (PSR)
- Document your code using PHPDocumentor's syntax
- Write unit tests using PHPUnit.
- Tests should test behavior, not a million return types to find bugs (like I used to do). In other words, test inputs and outputs in different scenarios to make sure the function fulfills its promise to the rest of the code.
- Tests should be named
test<methodName>_returns<Value>_if<testCase>
(e.g.,testCopy_returnsTrue_ifSourceIsEmpty
) ortest<methodName>_throws<exceptionName>_if<testCase>
(e.g.,testCopy_throwsInvalidArgumentException_ifSourceDoesNotExist
). - Tests should include only one assertion (although, of course, there are exceptions to this rule).
If those rules are palatable, here are the steps to follow:
- Fork
- Clone
- PHPUnit
- Branch
- PHPUnit
- Code
- PHPUnit
- Commit
- Push
- Pull request
- Relax and eat a Paleo muffin
That's it! Looking forward to your pull request. If you have any questions, email me at [email protected]. Thanks.