aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
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
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')
-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
-rw-r--r--phpBB/phpbb/auth/provider/ldap.php1
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php12
-rw-r--r--phpBB/phpbb/auth/provider/oauth/token_storage.php4
-rw-r--r--phpBB/phpbb/db/driver/mssql.php2
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php4
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php6
-rw-r--r--phpBB/phpbb/db/driver/postgres.php6
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications.php2
-rw-r--r--phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php6
-rw-r--r--phpBB/phpbb/db/migration/data/v310/style_update_p2.php8
-rw-r--r--phpBB/phpbb/db/migration/data/v310/teampage.php2
-rw-r--r--phpBB/phpbb/db/tools.php2
-rw-r--r--phpBB/phpbb/event/kernel_exception_subscriber.php1
-rw-r--r--phpBB/phpbb/extension/manager.php6
-rw-r--r--phpBB/phpbb/extension/metadata_manager.php2
-rw-r--r--phpBB/phpbb/feed/base.php2
-rw-r--r--phpBB/phpbb/notification/type/approve_topic.php2
-rw-r--r--phpBB/phpbb/search/fulltext_native.php1
-rw-r--r--phpBB/phpbb/session.php1
-rw-r--r--phpBB/phpbb/template/context.php4
-rw-r--r--phpBB/phpbb/template/twig/node/includephp.php2
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php2
-rw-r--r--phpBB/phpbb/user.php1
30 files changed, 70 insertions, 65 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();
diff --git a/phpBB/phpbb/auth/provider/ldap.php b/phpBB/phpbb/auth/provider/ldap.php
index 9d29789567..2123a587cb 100644
--- a/phpBB/phpbb/auth/provider/ldap.php
+++ b/phpBB/phpbb/auth/provider/ldap.php
@@ -97,7 +97,6 @@ class ldap extends \phpbb\auth\provider\base
@ldap_close($ldap);
-
if (!is_array($result) || sizeof($result) < 2)
{
return sprintf($this->user->lang['LDAP_NO_IDENTITY'], $this->user->data['username']);
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index de81ac0d04..5df56db00a 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -179,7 +179,7 @@ class oauth extends \phpbb\auth\provider\base
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
$query = 'mode=login&login=external&oauth_service=' . $service_name_original;
- $service = $this->get_service($service_name_original, $storage, $service_credentials, $this->service_providers[$service_name]->get_auth_scope(), $query);
+ $service = $this->get_service($service_name_original, $storage, $service_credentials, $query, $this->service_providers[$service_name]->get_auth_scope());
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
{
@@ -273,13 +273,13 @@ class oauth extends \phpbb\auth\provider\base
* @param string $service_name The name of the service
* @param \phpbb\auth\provider\oauth\token_storage $storage
* @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
- * @param array $scope The scope of the request against
- * the api.
* @param string $query The query string of the
* current_uri used in redirection
+ * @param array $scope The scope of the request against
+ * the api.
* @return \OAuth\Common\Service\ServiceInterface
*/
- protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, array $scopes = array(), $query)
+ protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array())
{
$current_uri = $this->get_current_uri($service_name, $query);
@@ -458,7 +458,7 @@ class oauth extends \phpbb\auth\provider\base
// Prepare for an authentication request
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
$scopes = $this->service_providers[$service_name]->get_auth_scope();
- $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query);
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
$this->service_providers[$service_name]->set_external_service_provider($service);
// The user has already authenticated successfully, request to authenticate again
@@ -491,7 +491,7 @@ class oauth extends \phpbb\auth\provider\base
$query = 'i=ucp_auth_link&mode=auth_link&link=1&oauth_service=' . strtolower($link_data['oauth_service']);
$service_credentials = $this->service_providers[$service_name]->get_service_credentials();
$scopes = $this->service_providers[$service_name]->get_auth_scope();
- $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query);
+ $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes);
if ($this->request->is_set('code', \phpbb\request\request_interface::GET))
{
diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php
index 2ce0e32da3..cc912abf6d 100644
--- a/phpBB/phpbb/auth/provider/oauth/token_storage.php
+++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php
@@ -78,7 +78,7 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken instanceOf TokenInterface)
+ if ($this->cachedToken instanceof TokenInterface)
{
return $this->cachedToken;
}
@@ -238,7 +238,7 @@ class token_storage implements TokenStorageInterface
{
$service = $this->get_service_name_for_db($service);
- if ($this->cachedToken instanceOf TokenInterface) {
+ if ($this->cachedToken instanceof TokenInterface) {
return $this->cachedToken;
}
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index 50096deded..e1b41461e2 100644
--- a/phpBB/phpbb/db/driver/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -259,7 +259,7 @@ class mssql extends \phpbb\db\driver\driver
{
foreach ($row as $key => $value)
{
- $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
+ $row[$key] = ($value === ' ' || $value === null) ? '' : $value;
}
}
diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index aade311bcb..2eb625fb11 100644
--- a/phpBB/phpbb/db/driver/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -195,7 +195,7 @@ class result_mssqlnative
*/
class mssqlnative extends \phpbb\db\driver\mssql_base
{
- var $m_insert_id = NULL;
+ var $m_insert_id = null;
var $last_query_text = '';
var $query_options = array();
var $connect_error = '';
@@ -427,7 +427,7 @@ class mssqlnative extends \phpbb\db\driver\mssql_base
{
foreach ($row as $key => $value)
{
- $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
+ $row[$key] = ($value === ' ' || $value === null) ? '' : $value;
}
// remove helper values from LIMIT queries
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 4d0e43b464..6144dba0c4 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -47,11 +47,11 @@ class mysqli extends \phpbb\db\driver\mysql_base
$this->server = ($this->persistency) ? 'p:' . (($sqlserver) ? $sqlserver : 'localhost') : $sqlserver;
$this->dbname = $database;
- $port = (!$port) ? NULL : $port;
+ $port = (!$port) ? null : $port;
// If port is set and it is not numeric, most likely mysqli socket is set.
// Try to map it to the $socket parameter.
- $socket = NULL;
+ $socket = null;
if ($port)
{
if (is_numeric($port))
@@ -61,7 +61,7 @@ class mysqli extends \phpbb\db\driver\mysql_base
else
{
$socket = $port;
- $port = NULL;
+ $port = null;
}
}
diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php
index 9cbb1ecb07..5cd6578d87 100644
--- a/phpBB/phpbb/db/driver/postgres.php
+++ b/phpBB/phpbb/db/driver/postgres.php
@@ -328,7 +328,7 @@ class postgres extends \phpbb\db\driver\driver
return false;
}
- $temp_result = @pg_fetch_assoc($temp_q_id, NULL);
+ $temp_result = @pg_fetch_assoc($temp_q_id, null);
@pg_free_result($query_id);
return ($temp_result) ? $temp_result['last_value'] : false;
@@ -456,7 +456,7 @@ class postgres extends \phpbb\db\driver\driver
if ($result = @pg_query($this->db_connect_id, "EXPLAIN $explain_query"))
{
- while ($row = @pg_fetch_assoc($result, NULL))
+ while ($row = @pg_fetch_assoc($result, null))
{
$html_table = $this->sql_report('add_select_row', $query, $html_table, $row);
}
@@ -476,7 +476,7 @@ class postgres extends \phpbb\db\driver\driver
$endtime = $endtime[0] + $endtime[1];
$result = @pg_query($this->db_connect_id, $query);
- while ($void = @pg_fetch_assoc($result, NULL))
+ while ($void = @pg_fetch_assoc($result, null))
{
// Take the time spent on parsing rows into account
}
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications.php b/phpBB/phpbb/db/migration/data/v310/notifications.php
index 10f1392094..61be25bb5f 100644
--- a/phpBB/phpbb/db/migration/data/v310/notifications.php
+++ b/phpBB/phpbb/db/migration/data/v310/notifications.php
@@ -34,7 +34,7 @@ class notifications extends \phpbb\db\migration\migration
),
$this->table_prefix . 'notifications' => array(
'COLUMNS' => array(
- 'notification_id' => array('UINT', NULL, 'auto_increment'),
+ 'notification_id' => array('UINT', null, 'auto_increment'),
'item_type' => array('VCHAR:255', ''),
'item_id' => array('UINT', 0),
'item_parent_id' => array('UINT', 0),
diff --git a/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php
index 8ed626d8a6..eb2eb361ee 100644
--- a/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php
+++ b/phpBB/phpbb/db/migration/data/v310/notifications_schema_fix.php
@@ -26,7 +26,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
'add_tables' => array(
$this->table_prefix . 'notification_types' => array(
'COLUMNS' => array(
- 'notification_type_id' => array('USINT', NULL, 'auto_increment'),
+ 'notification_type_id' => array('USINT', null, 'auto_increment'),
'notification_type_name' => array('VCHAR:255', ''),
'notification_type_enabled' => array('BOOL', 1),
),
@@ -37,7 +37,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
),
$this->table_prefix . 'notifications' => array(
'COLUMNS' => array(
- 'notification_id' => array('UINT:10', NULL, 'auto_increment'),
+ 'notification_id' => array('UINT:10', null, 'auto_increment'),
'notification_type_id' => array('USINT', 0),
'item_id' => array('UINT', 0),
'item_parent_id' => array('UINT', 0),
@@ -73,7 +73,7 @@ class notifications_schema_fix extends \phpbb\db\migration\migration
),
$this->table_prefix . 'notifications' => array(
'COLUMNS' => array(
- 'notification_id' => array('UINT', NULL, 'auto_increment'),
+ 'notification_id' => array('UINT', null, 'auto_increment'),
'item_type' => array('VCHAR:255', ''),
'item_id' => array('UINT', 0),
'item_parent_id' => array('UINT', 0),
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php
index 202a8409fb..c5b45d9dc9 100644
--- a/phpBB/phpbb/db/migration/data/v310/style_update_p2.php
+++ b/phpBB/phpbb/db/migration/data/v310/style_update_p2.php
@@ -56,7 +56,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
'add_tables' => array(
$this->table_prefix . 'styles_imageset' => array(
'COLUMNS' => array(
- 'imageset_id' => array('UINT', NULL, 'auto_increment'),
+ 'imageset_id' => array('UINT', null, 'auto_increment'),
'imageset_name' => array('VCHAR_UNI:255', ''),
'imageset_copyright' => array('VCHAR_UNI', ''),
'imageset_path' => array('VCHAR:100', ''),
@@ -68,7 +68,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
),
$this->table_prefix . 'styles_imageset_data' => array(
'COLUMNS' => array(
- 'image_id' => array('UINT', NULL, 'auto_increment'),
+ 'image_id' => array('UINT', null, 'auto_increment'),
'image_name' => array('VCHAR:200', ''),
'image_filename' => array('VCHAR:200', ''),
'image_lang' => array('VCHAR:30', ''),
@@ -83,7 +83,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
),
$this->table_prefix . 'styles_template' => array(
'COLUMNS' => array(
- 'template_id' => array('UINT', NULL, 'auto_increment'),
+ 'template_id' => array('UINT', null, 'auto_increment'),
'template_name' => array('VCHAR_UNI:255', ''),
'template_copyright' => array('VCHAR_UNI', ''),
'template_path' => array('VCHAR:100', ''),
@@ -112,7 +112,7 @@ class style_update_p2 extends \phpbb\db\migration\migration
),
$this->table_prefix . 'styles_theme' => array(
'COLUMNS' => array(
- 'theme_id' => array('UINT', NULL, 'auto_increment'),
+ 'theme_id' => array('UINT', null, 'auto_increment'),
'theme_name' => array('VCHAR_UNI:255', ''),
'theme_copyright' => array('VCHAR_UNI', ''),
'theme_path' => array('VCHAR:100', ''),
diff --git a/phpBB/phpbb/db/migration/data/v310/teampage.php b/phpBB/phpbb/db/migration/data/v310/teampage.php
index 80cc4be1c0..172435c672 100644
--- a/phpBB/phpbb/db/migration/data/v310/teampage.php
+++ b/phpBB/phpbb/db/migration/data/v310/teampage.php
@@ -27,7 +27,7 @@ class teampage extends \phpbb\db\migration\migration
'add_tables' => array(
$this->table_prefix . 'teampage' => array(
'COLUMNS' => array(
- 'teampage_id' => array('UINT', NULL, 'auto_increment'),
+ 'teampage_id' => array('UINT', null, 'auto_increment'),
'group_id' => array('UINT', 0),
'teampage_name' => array('VCHAR_UNI:255', ''),
'teampage_position' => array('UINT', 0),
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 1f156fbb04..d9bd8cf568 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -33,7 +33,7 @@ class tools
/**
* @var object DB object
*/
- var $db = NULL;
+ var $db = null;
/**
* The Column types for every database we support
diff --git a/phpBB/phpbb/event/kernel_exception_subscriber.php b/phpBB/phpbb/event/kernel_exception_subscriber.php
index 09103680e8..7003e73b38 100644
--- a/phpBB/phpbb/event/kernel_exception_subscriber.php
+++ b/phpBB/phpbb/event/kernel_exception_subscriber.php
@@ -72,7 +72,6 @@ class kernel_exception_subscriber implements EventSubscriberInterface
page_footer(true, false, false);
-
$status_code = $exception instanceof HttpException ? $exception->getStatusCode() : 500;
$response = new Response($this->template->assign_display('body'), $status_code);
$event->setResponse($response);
diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php
index ce6d7e05c8..f8beb963ba 100644
--- a/phpBB/phpbb/extension/manager.php
+++ b/phpBB/phpbb/extension/manager.php
@@ -234,7 +234,9 @@ class manager
*/
public function enable($name)
{
+ // @codingStandardsIgnoreStart
while ($this->enable_step($name));
+ // @codingStandardsIgnoreEnd
}
/**
@@ -311,7 +313,9 @@ class manager
*/
public function disable($name)
{
+ // @codingStandardsIgnoreStart
while ($this->disable_step($name));
+ // @codingStandardsIgnoreEnd
}
/**
@@ -388,7 +392,9 @@ class manager
*/
public function purge($name)
{
+ // @codingStandardsIgnoreStart
while ($this->purge_step($name));
+ // @codingStandardsIgnoreEnd
}
/**
diff --git a/phpBB/phpbb/extension/metadata_manager.php b/phpBB/phpbb/extension/metadata_manager.php
index 19c6288e96..ff5d55c7f2 100644
--- a/phpBB/phpbb/extension/metadata_manager.php
+++ b/phpBB/phpbb/extension/metadata_manager.php
@@ -169,7 +169,7 @@ class metadata_manager
throw new \phpbb\extension\exception('file_get_contents failed on ' . $this->metadata_file);
}
- if (($metadata = json_decode($file_contents, true)) === NULL)
+ if (($metadata = json_decode($file_contents, true)) === null)
{
throw new \phpbb\extension\exception('json_decode failed on ' . $this->metadata_file);
}
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php
index de7dd41df4..8245b849a1 100644
--- a/phpBB/phpbb/feed/base.php
+++ b/phpBB/phpbb/feed/base.php
@@ -150,7 +150,7 @@ abstract class base
*/
function get($key)
{
- return (isset($this->keys[$key])) ? $this->keys[$key] : NULL;
+ return (isset($this->keys[$key])) ? $this->keys[$key] : null;
}
function get_readable_forums()
diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php
index ca5bb67754..9f061b8be1 100644
--- a/phpBB/phpbb/notification/type/approve_topic.php
+++ b/phpBB/phpbb/notification/type/approve_topic.php
@@ -34,7 +34,7 @@ class approve_topic extends \phpbb\notification\type\topic
{
return 'approve_topic';
}
-
+
/**
* Language key used to output the text
*
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php
index 33326f2882..024b8f441b 100644
--- a/phpBB/phpbb/search/fulltext_native.php
+++ b/phpBB/phpbb/search/fulltext_native.php
@@ -850,7 +850,6 @@ class fulltext_native extends \phpbb\search\base
}
$this->db->sql_freeresult($result);
-
// if we use mysql and the total result count is not cached yet, retrieve it from the db
if (!$total_results && $is_mysql)
{
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 5e4380bfc8..214ab8fd33 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -1235,7 +1235,6 @@ class session
$this->session_create(ANONYMOUS);
}
-
// Determine which message to output
$till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : '';
$message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 24234c1e4a..decd1c7956 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -285,7 +285,7 @@ class context
// Search array to get correct position
list($search_key, $search_value) = @each($key);
- $key = NULL;
+ $key = null;
foreach ($block as $i => $val_ary)
{
if ($val_ary[$search_key] === $search_value)
@@ -296,7 +296,7 @@ class context
}
// key/value pair not found
- if ($key === NULL)
+ if ($key === null)
{
return false;
}
diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php
index 4024cf0cc8..70dcf85d62 100644
--- a/phpBB/phpbb/template/twig/node/includephp.php
+++ b/phpBB/phpbb/template/twig/node/includephp.php
@@ -23,7 +23,7 @@ class includephp extends \Twig_Node
/** @var Twig_Environment */
protected $environment;
- public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $ignoreMissing = false, $lineno, $tag = null)
+ public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $ignoreMissing = false, $tag = null)
{
$this->environment = $environment;
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
index d906837590..25170e7214 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includephp.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -43,7 +43,7 @@ class includephp extends \Twig_TokenParser
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
- return new \phpbb\template\twig\node\includephp($expr, $this->parser->getEnvironment(), $ignoreMissing, $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\includephp($expr, $this->parser->getEnvironment(), $token->getLine(), $ignoreMissing, $this->getTag());
}
/**
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index f97cc94d40..d82acbf501 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -343,7 +343,6 @@ class user extends \phpbb\session
}
}
-
// Does the user need to change their password? If so, redirect to the
// ucp profile reg_details page ... of course do not redirect if we're already in the ucp
if (!defined('IN_ADMIN') && !defined('ADMIN_START') && $config['chg_passforce'] && !empty($this->data['is_registered']) && $auth->acl_get('u_chgpasswd') && $this->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400))