CI coding style - help |
[eluser]Unknown[/eluser]
ello i'am trying to keep CI nice coding style, but i have no idea what to do with constructions like this: Code: function set_form($data) how would you format code like above one?? is there a CI code style manual?? If not it could be a good idea to create one - a nice coding style 9formating text etc..) (like Ci) is also very important.
[eluser]Derek Allard[/eluser]
You bet. I wrote about EllisLab Developer guidelines once upon a time. The direct link is http://expressionengine.com/docs/develop...index.html.
[eluser]Unknown[/eluser]
nice ![]()
[eluser]thomas.ernest[/eluser]
There is no rule related to the ternary operator as far as I know. But there are for control structure like if/else. They have to use something similar to the Allman style indenting [ci-style-if]. I'm used to develop with PHP_CodeSniffer [phpcs] to check the coding convention of my php code. However, it doesn't support Code Igniter style guide [ci-style] natively. So, I've developed something. It doesn't check all standard requirements, but already more than nothing. Feel free to give a try and share your feedbacks. [ci-style-if] http://ellislab.com/codeigniter/user-gui..._indenting [phpcs] http://pear.php.net/package/PHP_CodeSniffer/ [ci-style] http://ellislab.com/codeigniter/user-gui...guide.html [ci4php-cs] https://github.com/thomas-ernest/CodeIgn...odeSniffer |
Welcome Guest, Not a member yet? Register Sign In |