mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 16:22:22 +02:00
[ticket/12721] Add Squiz.ControlStructures.ElseIfDeclaration in legacy
PHPBB3-12721
This commit is contained in:
parent
06bf864c41
commit
09fc008e62
@ -45,6 +45,9 @@
|
||||
<!-- When referencing arrays you should not put whitespace around the opening bracket or before the closing bracket. -->
|
||||
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
|
||||
|
||||
<!-- Verifies that there are not elseif statements. The else and the if should be separated by a space. -->
|
||||
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
|
||||
|
||||
<!-- In the argument list, there MUST NOT be a space before each comma,
|
||||
and there MUST be one space after each comma. -->
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||
|
@ -496,11 +496,11 @@ function mcp_move_topic($topic_ids)
|
||||
{
|
||||
$topics_moved++;
|
||||
}
|
||||
elseif ($topic_info['topic_visibility'] == ITEM_UNAPPROVED || $topic_info['topic_visibility'] == ITEM_REAPPROVE)
|
||||
else if ($topic_info['topic_visibility'] == ITEM_UNAPPROVED || $topic_info['topic_visibility'] == ITEM_REAPPROVE)
|
||||
{
|
||||
$topics_moved_unapproved++;
|
||||
}
|
||||
elseif ($topic_info['topic_visibility'] == ITEM_DELETED)
|
||||
else if ($topic_info['topic_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$topics_moved_softdeleted++;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=reports');
|
||||
}
|
||||
elseif ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
|
||||
else if ($action == 'delete' && strpos($user->data['session_page'], 'mode=pm_report_details') !== false)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=pm_reports');
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
//
|
||||
// $Id: sphinxapi.php 3087 2012-01-30 23:07:35Z shodan $
|
||||
|
@ -53,7 +53,7 @@ class provider_collection extends \phpbb\di\service_collection
|
||||
return $this->offsetGet('auth.provider.' . basename(trim($this->config['auth_method'])));
|
||||
}
|
||||
// Revert to db auth provider if selected method does not exist
|
||||
elseif ($this->offsetExists('auth.provider.db'))
|
||||
else if ($this->offsetExists('auth.provider.db'))
|
||||
{
|
||||
return $this->offsetGet('auth.provider.db');
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class upload extends \phpbb\avatar\driver\driver
|
||||
{
|
||||
$file = $upload->form_upload('avatar_upload_file');
|
||||
}
|
||||
elseif (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
|
||||
else if (!empty($this->config['allow_avatar_remote_upload']) && !empty($url))
|
||||
{
|
||||
if (!preg_match('#^(http|https|ftp)://#i', $url))
|
||||
{
|
||||
|
2
phpBB/phpbb/cache/driver/file.php
vendored
2
phpBB/phpbb/cache/driver/file.php
vendored
@ -224,7 +224,7 @@ class file extends \phpbb\cache\driver\base
|
||||
{
|
||||
$this->remove_dir($fileInfo->getPathname());
|
||||
}
|
||||
elseif (strpos($filename, 'container_') === 0 ||
|
||||
else if (strpos($filename, 'container_') === 0 ||
|
||||
strpos($filename, 'url_matcher') === 0 ||
|
||||
strpos($filename, 'sql_') === 0 ||
|
||||
strpos($filename, 'data_') === 0)
|
||||
|
@ -60,7 +60,7 @@ class get extends command
|
||||
{
|
||||
$output->write($this->config[$key]);
|
||||
}
|
||||
elseif (isset($this->config[$key]))
|
||||
else if (isset($this->config[$key]))
|
||||
{
|
||||
$output->writeln($this->config[$key]);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class helper
|
||||
$data[$type] .= ($data[$type] !== '$') ? '\\' : '';
|
||||
$data[$type] .= str_replace('$', '', $value);
|
||||
}
|
||||
elseif ($type == 'settings')
|
||||
else if ($type == 'settings')
|
||||
{
|
||||
$data[$type] .= ($data[$type] !== '$') ? '$' : '';
|
||||
$data[$type] .= $value;
|
||||
|
@ -263,12 +263,12 @@ class fulltext_postgres extends \phpbb\search\base
|
||||
$this->search_query .= $word . ' ';
|
||||
$this->tsearch_query .= '&' . substr($word, 1) . ' ';
|
||||
}
|
||||
elseif (strpos($word, '-') === 0)
|
||||
else if (strpos($word, '-') === 0)
|
||||
{
|
||||
$this->search_query .= $word . ' ';
|
||||
$this->tsearch_query .= '&!' . substr($word, 1) . ' ';
|
||||
}
|
||||
elseif (strpos($word, '|') === 0)
|
||||
else if (strpos($word, '|') === 0)
|
||||
{
|
||||
$this->search_query .= $word . ' ';
|
||||
$this->tsearch_query .= '|' . substr($word, 1) . ' ';
|
||||
|
Loading…
x
Reference in New Issue
Block a user