-
Notifications
You must be signed in to change notification settings - Fork 0
coding standards
ThorbenKuck edited this page Oct 4, 2016
·
1 revision
Names: While in oop-style, use CamelCase. For Example:
private static $packageRoot;public static function loadSocket() : bool { ... }
While in procedural-style, use "_" for seperation. For Example
function load_theme() { ... }
Instantiate vars at start of algorith. For Example:
- Bad:
$erg = array_search("foo", ["foo" => "bar"]); - Good:
$to_search_for = "foo"; $array = ["foo" => "bar"]; $erg = array_search($to_seach_for, $array);