mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +02:00
Updated e107 Coding Standard (markdown)
@@ -82,6 +82,20 @@ class myplugin_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
class news_form_ui extends e_admin_form_ui
|
||||||
|
{
|
||||||
|
|
||||||
|
function news_template($curVal,$mode)
|
||||||
|
{
|
||||||
|
if($mode === 'read')
|
||||||
|
{
|
||||||
|
return $curVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ...
|
||||||
|
```
|
||||||
|
|
||||||
Routines are to be documented at both file and function level using phpDoc syntax. Where appropriate create supplementary pages of general documentation, and document individual variables.
|
Routines are to be documented at both file and function level using phpDoc syntax. Where appropriate create supplementary pages of general documentation, and document individual variables.
|
||||||
When passing more than three or so parameters to a function, consider passing some of them in an array (especially convenient if many are optional) or if within a class, consider using vars.
|
When passing more than three or so parameters to a function, consider passing some of them in an array (especially convenient if many are optional) or if within a class, consider using vars.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user