aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-28 22:27:25 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-10-28 23:05:46 +0100
commit7f58a4572eaca75aecff2da889e67ea151616011 (patch)
treeeaf63a3cbcfac54cd656a380e0c0f2800dfe660e /phpBB/includes
parent2afd47b938f5cf9b89a46f44d6e022c38695764d (diff)
downloadforums-7f58a4572eaca75aecff2da889e67ea151616011.tar
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.gz
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.bz2
forums-7f58a4572eaca75aecff2da889e67ea151616011.tar.xz
forums-7f58a4572eaca75aecff2da889e67ea151616011.zip
[ticket/11981] Fix code sniffer complaints
PHPBB3-11981
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_database.php14
-rw-r--r--phpBB/includes/acp/acp_styles.php6
-rw-r--r--phpBB/includes/acp/auth.php6
-rw-r--r--phpBB/includes/captcha/captcha_gd_wave.php4
-rw-r--r--phpBB/includes/functions_compress.php12
-rw-r--r--phpBB/includes/functions_messenger.php2
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php12
7 files changed, 30 insertions, 26 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index fc08a5fb94..86879de816 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -94,29 +94,29 @@ class acp_database
case 'mysqli':
case 'mysql4':
case 'mysql':
- $extractor = new mysql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mysql_extractor($format, $filename, $time, $download, $store);
break;
case 'sqlite':
- $extractor = new sqlite_extractor($download, $store, $format, $filename, $time);
+ $extractor = new sqlite_extractor($format, $filename, $time, $download, $store);
break;
case 'postgres':
- $extractor = new postgres_extractor($download, $store, $format, $filename, $time);
+ $extractor = new postgres_extractor($format, $filename, $time, $download, $store);
break;
case 'oracle':
- $extractor = new oracle_extractor($download, $store, $format, $filename, $time);
+ $extractor = new oracle_extractor($format, $filename, $time, $download, $store);
break;
case 'mssql':
case 'mssql_odbc':
case 'mssqlnative':
- $extractor = new mssql_extractor($download, $store, $format, $filename, $time);
+ $extractor = new mssql_extractor($format, $filename, $time, $download, $store);
break;
case 'firebird':
- $extractor = new firebird_extractor($download, $store, $format, $filename, $time);
+ $extractor = new firebird_extractor($format, $filename, $time, $download, $store);
break;
}
@@ -488,7 +488,7 @@ class base_extractor
var $format;
var $run_comp = false;
- function base_extractor($download = false, $store = false, $format, $filename, $time)
+ function base_extractor($format, $filename, $time, $download = false, $store = false)
{
global $request;
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 094d84de40..d5492d85a3 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -888,7 +888,11 @@ class acp_styles
protected function list_style(&$style, $level)
{
// Mark row as shown
- if (!empty($style['_shown'])) return;
+ if (!empty($style['_shown']))
+ {
+ return;
+ }
+
$style['_shown'] = true;
// Generate template variables
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index f5f90fb5b8..a023bced0a 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -506,7 +506,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
unset($content_array[$ug_id]);
}
@@ -593,7 +593,7 @@ class auth_admin extends \phpbb\auth\auth
'FORUM_ID' => $forum_id)
);
- $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
+ $this->assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, ($mode == 'view'), $show_trace);
}
unset($hold_ary[$ug_id], $ug_names_ary[$ug_id]);
@@ -1099,7 +1099,7 @@ class auth_admin extends \phpbb\auth\auth
* Assign category to template
* used by display_mask()
*/
- function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $show_trace = false, $s_view)
+ function assign_cat_array(&$category_array, $tpl_cat, $tpl_mask, $ug_id, $forum_id, $s_view, $show_trace = false)
{
global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;
diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php
index e19f54f777..a61324d120 100644
--- a/phpBB/includes/captcha/captcha_gd_wave.php
+++ b/phpBB/includes/captcha/captcha_gd_wave.php
@@ -184,7 +184,7 @@ class captcha
for ($x = 1; $x <= $full_x; ++$x)
{
- $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid);
+ $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, $x_grid, $y_grid, 1);
// height is a z-factor, not a y-factor
$offset = $cur_height - $prev_height;
@@ -264,7 +264,7 @@ class captcha
return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak);
}
- function grid_height($x, $y, $factor = 1, $x_grid, $y_grid)
+ function grid_height($x, $y, $x_grid, $y_grid, $factor = 1)
{
return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0);
}
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index c79a31930e..39a1b2ad21 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -46,7 +46,7 @@ class compress
if (is_file($phpbb_root_path . $src))
{
- $this->data($src_path, file_get_contents("$phpbb_root_path$src"), false, stat("$phpbb_root_path$src"));
+ $this->data($src_path, file_get_contents("$phpbb_root_path$src"), stat("$phpbb_root_path$src"), false);
}
else if (is_dir($phpbb_root_path . $src))
{
@@ -86,7 +86,7 @@ class compress
continue;
}
- $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), false, stat("$phpbb_root_path$src$path$file"));
+ $this->data("$src_path$path$file", file_get_contents("$phpbb_root_path$src$path$file"), stat("$phpbb_root_path$src$path$file"), false);
}
}
}
@@ -109,7 +109,7 @@ class compress
return false;
}
- $this->data($filename, file_get_contents($src), false, stat($src));
+ $this->data($filename, file_get_contents($src), stat($src), false);
return true;
}
@@ -123,7 +123,7 @@ class compress
$stat[4] = $stat[5] = 0;
$stat[7] = strlen($src);
$stat[9] = time();
- $this->data($name, $src, false, $stat);
+ $this->data($name, $src, $stat, false);
return true;
}
@@ -395,7 +395,7 @@ class compress_zip extends compress
/**
* Create the structures ... note we assume version made by is MSDOS
*/
- function data($name, $data, $is_dir = false, $stat)
+ function data($name, $data, $stat, $is_dir = false)
{
$name = str_replace('\\', '/', $name);
$name = $this->unique_filename($name);
@@ -669,7 +669,7 @@ class compress_tar extends compress
/**
* Create the structures
*/
- function data($name, $data, $is_dir = false, $stat)
+ function data($name, $data, $stat, $is_dir = false)
{
$name = $this->unique_filename($name);
$this->wrote = true;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 5b343e616e..6ceeb50330 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -1414,7 +1414,7 @@ class smtp_class
$result = false;
$stream_meta = stream_get_meta_data($this->socket);
- if (socket_set_blocking($this->socket, 1));
+ if (socket_set_blocking($this->socket, 1))
{
$result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
socket_set_blocking($this->socket, (int) $stream_meta['blocked']);
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 145963837c..dd62b69342 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -78,9 +78,9 @@ class ucp_notifications
trigger_error($message);
}
- $this->output_notification_methods('notification_methods', $phpbb_notifications, $template, $user);
+ $this->output_notification_methods($phpbb_notifications, $template, $user, 'notification_methods');
- $this->output_notification_types($subscriptions, 'notification_types', $phpbb_notifications, $template, $user);
+ $this->output_notification_types($subscriptions, $phpbb_notifications, $template, $user, 'notification_types');
$this->tpl_name = 'ucp_notifications';
$this->page_title = 'UCP_NOTIFICATION_OPTIONS';
@@ -162,12 +162,12 @@ class ucp_notifications
/**
* Output all the notification types to the template
*
- * @param string $block
* @param \phpbb\notification\manager $phpbb_notifications
* @param \phpbb\template\template $template
* @param \phpbb\user $user
+ * @param string $block
*/
- public function output_notification_types($subscriptions, $block = 'notification_types', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user)
+ public function output_notification_types($subscriptions, \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_types')
{
$notification_methods = $phpbb_notifications->get_subscription_methods();
@@ -209,12 +209,12 @@ class ucp_notifications
/**
* Output all the notification methods to the template
*
- * @param string $block
* @param \phpbb\notification\manager $phpbb_notifications
* @param \phpbb\template\template $template
* @param \phpbb\user $user
+ * @param string $block
*/
- public function output_notification_methods($block = 'notification_methods', \phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user)
+ public function output_notification_methods(\phpbb\notification\manager $phpbb_notifications, \phpbb\template\template $template, \phpbb\user $user, $block = 'notification_methods')
{
$notification_methods = $phpbb_notifications->get_subscription_methods();