mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12721] Add Squiz.ControlStructures.ForLoopDeclaration in legacy
PHPBB3-12721
This commit is contained in:
parent
99a2f2fdb4
commit
a94581e7ca
3 changed files with 5 additions and 2 deletions
|
@ -51,6 +51,9 @@
|
||||||
<!-- There should be a space between each element of a foreach loop and the as keyword should be lowercase. -->
|
<!-- There should be a space between each element of a foreach loop and the as keyword should be lowercase. -->
|
||||||
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration" />
|
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration" />
|
||||||
|
|
||||||
|
<!-- In a for loop declaration, there should be no space inside the brackets and there should be 0 spaces before and 1 space after semicolons. -->
|
||||||
|
<rule ref="Squiz.ControlStructures.ForLoopDeclaration" />
|
||||||
|
|
||||||
<!-- In the argument list, there MUST NOT be a space before each comma,
|
<!-- In the argument list, there MUST NOT be a space before each comma,
|
||||||
and there MUST be one space after each comma. -->
|
and there MUST be one space after each comma. -->
|
||||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||||
|
|
|
@ -2297,7 +2297,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
|
||||||
$message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message);
|
$message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message);
|
||||||
$message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message);
|
$message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message);
|
||||||
|
|
||||||
for ($i = sizeof($size); $i; )
|
for ($i = sizeof($size); $i;)
|
||||||
{
|
{
|
||||||
$i--;
|
$i--;
|
||||||
$message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message);
|
$message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message);
|
||||||
|
|
|
@ -1256,7 +1256,7 @@ $s_characters .= '<option value="0">0</option>';
|
||||||
$s_characters .= '<option value="25">25</option>';
|
$s_characters .= '<option value="25">25</option>';
|
||||||
$s_characters .= '<option value="50">50</option>';
|
$s_characters .= '<option value="50">50</option>';
|
||||||
|
|
||||||
for ($i = 100; $i <= 1000 ; $i += 100)
|
for ($i = 100; $i <= 1000; $i += 100)
|
||||||
{
|
{
|
||||||
$selected = ($i == 300) ? ' selected="selected"' : '';
|
$selected = ($i == 300) ? ' selected="selected"' : '';
|
||||||
$s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
|
$s_characters .= '<option value="' . $i . '"' . $selected . '>' . $i . '</option>';
|
||||||
|
|
Loading…
Add table
Reference in a new issue