tmarois / Filebase

A Simple but Powerful Flat File Database Storage.
MIT License
279 stars 48 forks source link

code style consistency #26

Open assemblie opened 6 years ago

assemblie commented 6 years ago

it could be very useful to implement coding style guide like PSR-2: https://www.php-fig.org/psr/psr-2/ (https://akrabat.com/checking-your-code-for-psr-2/)

here is an example: https://github.com/assemblie/Filebase/tree/style-guide

its really lot of changes for now but we can implement it step by step or create specific style guide: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial

imo its best to stay with PSR-2 as its most used across PHP ecosystem: https://symfony.com/doc/current/contributing/code/standards.html https://laravel.com/docs/5.6/contributions#coding-style http://auraphp.com/contributing/#standards https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartV/CodingGuideLines/PHP.html#general-considerations etc.

timothymarois commented 6 years ago

I like the idea. I try to stay within consistency. But I can see where the smaller things like brackets after or below the line could use some better alignments. Let's do it!