Open JakeBooher opened 10 years ago
I prefer the second method, most, if not all, of the code that I've written is this way.
So remove the annoying spaces before and inside the parenthesis? I +1 that.
I +2 that. mralex's vote is mine, ha!
this should show a depiction of K&R style that I'll be amending
<?php
namespace ezRPG\Something;
/**
* Comment
*/
class className
{
protected $var;
protected $var2;
/**
* functionName comment
*/
function functionName($param1, $param2)
{
$this->var = $param1;
$this->var2 = $param2;
if (some_thing) {
doSomething();
} else {
dontDoSomething();
}
return true;
}
}
Also, start implementing phpDOC style comments for functions and classes
REF: http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.pkg.html
In Library* you have
class className extends extendClass {
but in Module* you have
class className extends extendClass
{
New line for declaration statements.
There seems to be issues popping up with my last commit. App::error was said to be deprecated and not to use so I removed it.
I think we really need to go through every single line of code and make sure it is all standardized (such as spacing before parenthesis, no new line before curly brace, etc.) as currently there is a mix of things. For example, in one file you'll have something like:
and in others we have things like this
when it should all be standardized throught everything.