-
Notifications
You must be signed in to change notification settings - Fork 6
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
Style guide? #104
Comments
Ah, and one more thing - should we use camel case or snake case for function parameters? |
@radmen yeap I have copied PHPDocs from PhpStorm stubs |
For me it's fine - I can do the same for other functions. It would be good to use the same format. Should we use PhpStorm stubs? |
I vote always snake case for parameters, as it seems to be more common. |
I will add more stuff to CONTRIBUTING.md, including a style guide and more detailed instructions. |
What about new PSR coding standard? It is not "official" yet but it will be soon |
Very nice. I vote yes. Also, of course we would need to change some code, but even if the spec changed we would still be consistent in that we're using the same standard. Do you know how final the code is? Will there be pretty much no changes before the official release? |
@ddziaduch looks nice. Is this supported by |
I looked today somewhat briefly, they don't seem to even mention it. What are the new specs called, do you know? Perhaps PSR-9? That would ease searching... |
It does not have number yet. Seems that it is still a draft http://www.php-fig.org/psr/ |
Damn. The only solution would be to configure phpcs manually, so that we used its configuration for PSR-2 and configured everything else found in the draft manually. I don't know. |
We should use a consistent coding style. I think that we should stick to PSR-2 style guides.
It can be validated using
composer run-script phpcs
The second thing is the format of PHPDocs. I've used simplified doc blocks however, I see that @ddziaduch literally copied docs blocks from PHP source (or IDE stub :)). Which format should we use?
The text was updated successfully, but these errors were encountered: