1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 18:26:32 +02:00

Merge pull request #3696 from marc1706/ticket/13930-master

[ticket/13930] Check for correct spacing between keyword & parenthesis

* marc1706/ticket/13930-master:
  [ticket/13930] Add missing space to mssql_extractor
  [ticket/13930] Add missing spaces to code
  [ticket/13930] Use OpeningParenthesisSniff in legacy ruleset
  [ticket/13930] Remove not needed return statements
  [ticket/13930] Add missing spaces to code
  [ticket/13930] Check for correct spacing between keyword & parenthesis
This commit is contained in:
Andreas Fischer
2015-06-09 21:27:23 +02:00
10 changed files with 77 additions and 14 deletions

View File

@@ -1013,7 +1013,7 @@ class acp_styles
// Assign template variables
$this->template->assign_block_vars('styles_list', $row);
foreach($actions as $action)
foreach ($actions as $action)
{
$this->template->assign_block_vars('styles_list.actions', $action);
}

View File

@@ -966,7 +966,7 @@ function get_remote_avatar_dim($src, $axis)
$protocol = (isset($url_info['scheme'])) ? $url_info['scheme'] : 'http';
if (empty($port))
{
switch(strtolower($protocol))
switch (strtolower($protocol))
{
case 'ftp':
$port = 21;

View File

@@ -55,11 +55,11 @@ class ucp_notifications
$notification_methods = $phpbb_notifications->get_subscription_methods();
foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
foreach ($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
{
foreach($subscription_types as $type => $data)
foreach ($subscription_types as $type => $data)
{
foreach($notification_methods as $method => $method_data)
foreach ($notification_methods as $method => $method_data)
{
if ($request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))
{
@@ -183,13 +183,13 @@ class ucp_notifications
{
$notification_methods = $phpbb_notifications->get_subscription_methods();
foreach($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
foreach ($phpbb_notifications->get_subscription_types() as $group => $subscription_types)
{
$template->assign_block_vars($block, array(
'GROUP_NAME' => $user->lang($group),
));
foreach($subscription_types as $type => $data)
foreach ($subscription_types as $type => $data)
{
$template->assign_block_vars($block, array(
'TYPE' => $type,
@@ -200,7 +200,7 @@ class ucp_notifications
'SUBSCRIBED' => (isset($subscriptions[$type])) ? true : false,
));
foreach($notification_methods as $method => $method_data)
foreach ($notification_methods as $method => $method_data)
{
$template->assign_block_vars($block . '.notification_methods', array(
'METHOD' => $method_data['id'],
@@ -230,7 +230,7 @@ class ucp_notifications
{
$notification_methods = $phpbb_notifications->get_subscription_methods();
foreach($notification_methods as $method => $method_data)
foreach ($notification_methods as $method => $method_data)
{
$template->assign_block_vars($block, array(
'METHOD' => $method_data['id'],

View File

@@ -50,7 +50,7 @@ class memcache extends \phpbb\cache\driver\memory
parent::__construct();
$this->memcache = new \Memcache;
foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u)
foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u)
{
$parts = explode('/', $u);
$this->memcache->addServer(trim($parts[0]), trim($parts[1]));

View File

@@ -184,7 +184,7 @@ class mssql_extractor extends base_extractor
{
$this->write_data_mssql($table_name);
}
else if($this->db->get_sql_layer() === 'mssqlnative')
else if ($this->db->get_sql_layer() === 'mssqlnative')
{
$this->write_data_mssqlnative($table_name);
}

View File

@@ -535,7 +535,7 @@ class log implements \phpbb\log\log_interface
'ORDER_BY' => $sort_by,
);
if($log_time)
if ($log_time)
{
$get_logs_sql_ary['WHERE'] = 'l.log_time >= ' . (int) $log_time . '
AND ' . $get_logs_sql_ary['WHERE'];

View File

@@ -147,7 +147,7 @@ class fulltext_sphinx
global $phpbb_container; // TODO inject into object
$this->db_tools = $phpbb_container->get('dbal.tools');
if(!$this->config['fulltext_sphinx_id'])
if (!$this->config['fulltext_sphinx_id'])
{
$this->config->set('fulltext_sphinx_id', unique_id());
}

View File

@@ -590,7 +590,7 @@ $quickmod_array = array(
'topic_logs' => array('VIEW_TOPIC_LOGS', $auth->acl_get('m_', $forum_id)),
);
foreach($quickmod_array as $option => $qm_ary)
foreach ($quickmod_array as $option => $qm_ary)
{
if (!empty($qm_ary[1]))
{