From e9b7cb13245778f8ee31dca618a138e56feb61e8 Mon Sep 17 00:00:00 2001 From: Crizzo Date: Sun, 1 May 2016 22:31:39 +0200 Subject: [ticket/14619] Updates 3.1.x/ascraeus to 3.2.x/rhea PHPBB3-14619 --- phpBB/docs/coding-guidelines.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index eb0fb60de2..9e07290697 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -4,7 +4,7 @@ - + phpBB3 • Coding Guidelines @@ -22,7 +22,7 @@

Coding Guidelines

-

Ascraeus coding guidelines document

+

Rhea coding guidelines document

Skip

@@ -37,7 +37,7 @@

- These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible. + These are the phpBB Coding Guidelines for Rhea, all attempts should be made to follow them as closely as possible.

Coding Guidelines

@@ -1187,8 +1187,8 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group& # General Information about this style name = prosilver_duplicate copyright = © phpBB Limited, 2007 -style_version = 3.1.0 -phpbb_version = 3.1.0 +style_version = 3.2.0 +phpbb_version = 3.2.0 # Defining a different template bitfield # template_bitfield = lNg= @@ -1677,8 +1677,8 @@ div # General Information about this style name = Custom Style copyright = © phpBB Limited, 2007 -style_version = 3.1.0-b1 -phpbb_version = 3.1.0-b1 +style_version = 3.2.0-b1 +phpbb_version = 3.2.0-b1 # Defining a different template bitfield # template_bitfield = lNg= @@ -1725,7 +1725,7 @@ This may span multiple lines. + first/file/path.html + second/file/path.html * Purpose: Same as above. -* Since: 3.1.0-b1 +* Since: 3.2.0-b1
  • An event that is found multiple times in a file should have the number of instances in parenthesis next to the filename.
    event_name
    @@ -1734,7 +1734,7 @@ This may span multiple lines.
         + first/file/path.html (2)
         + second/file/path.html
     * Purpose: Same as above.
    -* Since: 3.1.0-b1
    +* Since: 3.2.0-b1
     
  • An actual example event documentation:
    forumlist_body_last_post_title_prepend
    @@ -1743,7 +1743,7 @@ This may span multiple lines.
         + styles/prosilver/template/forumlist_body.html
         + styles/subsilver2/template/forumlist_body.html
     * Purpose: Add content before the post title of the latest post in a forum on the forum list.
    -* Since: 3.1.0-a1
    +* Since: 3.2.0-a1
     

    -- cgit v1.2.1 From 4dfd12d5b2b007b220789712cb6d50a04a3efeee Mon Sep 17 00:00:00 2001 From: Crizzo Date: Thu, 7 Sep 2017 15:05:53 +0200 Subject: [ticket/15350] Changes outdated wiki-link to new docs/ PHPBB3-15350 --- phpBB/docs/coding-guidelines.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 9b5c668880..d90f4d4d32 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -2387,7 +2387,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) You have [1/21/31] slon, [2/3/4] slona, [0/5/6] slonova and [7/8/9/11] ... and some more difficult rules.

    -

    The plural system takes care of this and can be used as follows:

    +

    The plural system takes care of this and can be used as follows:

    The PHP code will basically look like this:

    -- cgit v1.2.1 From f8fbe3793680af1dae2db2829cfc84068831c52f Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 28 Jun 2017 00:58:03 +0700 Subject: [ticket/14972] replace all occurrences of sizeof() with the count() PHPBB3-14972 --- phpBB/docs/coding-guidelines.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index d90f4d4d32..569ffe680c 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -627,7 +627,7 @@ $min = ($i < $j) ? $i : $j;
    if (isset($forum) && $forum == 5)
    -

    The empty() function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of isset($array) && sizeof($array) > 0 - this can be written in a shorter way as !empty($array).

    +

    The empty() function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of isset($array) && count($array) > 0 - this can be written in a shorter way as !empty($array).

    Switch statements:

    Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:

    @@ -994,9 +994,9 @@ $sql = $db->sql_build_query('SELECT', $sql_array);

    Operations in loop definition:

    Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:

    -

    // On every iteration the sizeof function is called

    +

    // On every iteration the count function is called

    -for ($i = 0; $i < sizeof($post_data); $i++)
    +for ($i = 0; $i < count($post_data); $i++)
     {
     	do_something();
     }
    @@ -1004,7 +1004,7 @@ for ($i = 0; $i < sizeof($post_data); $i++)

    // You are able to assign the (not changing) result within the loop itself

    -for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
    +for ($i = 0, $size = count($post_data); $i < $size; $i++)
     {
     	do_something();
     }
    -- cgit v1.2.1