mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/16748] Enable code sniffing for static placement and adjust code
PHPBB3-16748
This commit is contained in:
@@ -52,7 +52,7 @@ class phpbb_dbal_auto_increment_test extends phpbb_database_test_case
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
static protected function get_default_values()
|
||||
protected static function get_default_values()
|
||||
{
|
||||
return array(
|
||||
'c_uint' => 0,
|
||||
|
@@ -99,7 +99,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||
$this->tools->sql_table_drop('prefix_table_name');
|
||||
}
|
||||
|
||||
static protected function get_default_values()
|
||||
protected static function get_default_values()
|
||||
{
|
||||
return array(
|
||||
'c_int_size' => 0,
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
class phpbb_filesystem_realpath_test extends phpbb_test_case
|
||||
{
|
||||
static protected $filesystem_own_realpath;
|
||||
protected static $filesystem_own_realpath;
|
||||
|
||||
/** @var \phpbb\filesystem\filesystem_interface */
|
||||
protected $filesystem;
|
||||
|
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
{
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'./',
|
||||
);
|
||||
|
||||
|
@@ -18,9 +18,9 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
|
||||
{
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'foo/bar/config/',
|
||||
'foo/bar/controller/',
|
||||
'foo/bar/event/',
|
||||
|
@@ -18,9 +18,9 @@ class phpbb_functional_extension_global_lang_test extends phpbb_functional_test_
|
||||
{
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'foo/bar/config/',
|
||||
'foo/bar/event/',
|
||||
'foo/bar/language/en/',
|
||||
|
@@ -19,9 +19,9 @@ class phpbb_functional_extension_module_test extends phpbb_functional_test_case
|
||||
{
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'./',
|
||||
);
|
||||
|
||||
|
@@ -18,9 +18,9 @@ class phpbb_functional_extension_permission_lang_test extends phpbb_functional_t
|
||||
{
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'foo/bar/config/',
|
||||
'foo/bar/event/',
|
||||
'foo/bar/language/en/',
|
||||
|
@@ -18,9 +18,9 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
|
||||
{
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
static private $helper;
|
||||
private static $helper;
|
||||
|
||||
static protected $fixtures = array(
|
||||
protected static $fixtures = array(
|
||||
'foo/bar/',
|
||||
);
|
||||
|
||||
@@ -31,7 +31,7 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
@@ -39,7 +39,7 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case
|
||||
self::$helper->copy_ext_fixtures(__DIR__ . '/fixtures/ext/', self::$fixtures);
|
||||
}
|
||||
|
||||
static public function tearDownAfterClass(): void
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
parent::tearDownAfterClass();
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_notification_test extends phpbb_functional_test_case
|
||||
{
|
||||
static public function user_subscription_data()
|
||||
public static function user_subscription_data()
|
||||
{
|
||||
return array(
|
||||
// Rows inserted by phpBB/install/schemas/schema_data.sql
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
class phpbb_functional_ucp_allow_pm_test extends phpbb_functional_test_case
|
||||
{
|
||||
static protected $data = array();
|
||||
protected static $data = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ class phpbb_functions_language_select_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(__DIR__.'/fixtures/language_select.xml');
|
||||
}
|
||||
|
||||
static public function language_select_data()
|
||||
public static function language_select_data()
|
||||
{
|
||||
return array(
|
||||
array('', '<option value="cs">Čeština</option><option value="en">English</option>'),
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
class lint_test extends phpbb_test_case
|
||||
{
|
||||
static protected $php_binary;
|
||||
protected static $php_binary;
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ require_once __DIR__ . '/../../phpBB/includes/functions_transfer.php';
|
||||
*/
|
||||
class phpbb_network_ftp_fsock_pasv_epsv_test extends phpbb_test_case
|
||||
{
|
||||
static protected $ipv4;
|
||||
protected static $ipv4;
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
{
|
||||
|
@@ -23,9 +23,9 @@ class phpbb_template_template_test_case extends phpbb_test_case
|
||||
// Keep the contents of the cache for debugging?
|
||||
const PRESERVE_CACHE = true;
|
||||
|
||||
static protected $language_reflection_lang;
|
||||
protected static $language_reflection_lang;
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
|
@@ -15,7 +15,7 @@ use PHPUnit\DbUnit\TestCase;
|
||||
|
||||
abstract class phpbb_database_test_case extends TestCase
|
||||
{
|
||||
static private $already_connected;
|
||||
private static $already_connected;
|
||||
|
||||
private $db_connections;
|
||||
|
||||
@@ -23,13 +23,13 @@ abstract class phpbb_database_test_case extends TestCase
|
||||
|
||||
protected $fixture_xml_data;
|
||||
|
||||
static protected $schema_file;
|
||||
protected static $schema_file;
|
||||
|
||||
static protected $phpbb_schema_copy;
|
||||
protected static $phpbb_schema_copy;
|
||||
|
||||
static protected $install_schema_file;
|
||||
protected static $install_schema_file;
|
||||
|
||||
static protected $phpunit_version;
|
||||
protected static $phpunit_version;
|
||||
|
||||
public function __construct($name = NULL, array $data = [], $dataName = '')
|
||||
{
|
||||
@@ -63,12 +63,12 @@ abstract class phpbb_database_test_case extends TestCase
|
||||
/**
|
||||
* @return array List of extensions that should be set up
|
||||
*/
|
||||
static protected function setup_extensions()
|
||||
protected static function setup_extensions()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -104,7 +104,7 @@ abstract class phpbb_database_test_case extends TestCase
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
static public function tearDownAfterClass(): void
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
if (file_exists(self::$install_schema_file))
|
||||
{
|
||||
@@ -367,7 +367,7 @@ abstract class phpbb_database_test_case extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
static public function get_core_tables() : array
|
||||
public static function get_core_tables() : array
|
||||
{
|
||||
global $phpbb_root_path, $table_prefix;
|
||||
|
||||
|
@@ -17,10 +17,10 @@ require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php';
|
||||
class phpbb_functional_test_case extends phpbb_test_case
|
||||
{
|
||||
/** @var \Goutte\Client */
|
||||
static protected $client;
|
||||
static protected $cookieJar;
|
||||
static protected $root_url;
|
||||
static protected $install_success = false;
|
||||
protected static $client;
|
||||
protected static $cookieJar;
|
||||
protected static $root_url;
|
||||
protected static $install_success = false;
|
||||
|
||||
protected $cache = null;
|
||||
protected $db = null;
|
||||
@@ -38,9 +38,9 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
*/
|
||||
protected $lang = array();
|
||||
|
||||
static protected $config = array();
|
||||
static protected $already_installed = false;
|
||||
static protected $last_post_timestamp = 0;
|
||||
protected static $config = array();
|
||||
protected static $already_installed = false;
|
||||
protected static $last_post_timestamp = 0;
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
{
|
||||
@@ -70,7 +70,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
/**
|
||||
* @return array List of extensions that should be set up
|
||||
*/
|
||||
static protected function setup_extensions()
|
||||
protected static function setup_extensions()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -270,7 +270,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
return $extension_manager;
|
||||
}
|
||||
|
||||
static protected function install_board()
|
||||
protected static function install_board()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
@@ -516,7 +516,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
$this->delete_ext_data($extension);
|
||||
}
|
||||
|
||||
static private function recreate_database($config)
|
||||
private static function recreate_database($config)
|
||||
{
|
||||
$db_conn_mgr = new phpbb_database_test_connection_manager($config);
|
||||
$db_conn_mgr->recreate_db();
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
abstract class phpbb_search_test_case extends phpbb_database_test_case
|
||||
{
|
||||
static protected function get_search_wrapper($class)
|
||||
protected static function get_search_wrapper($class)
|
||||
{
|
||||
$wrapped = str_replace('\\', '_', $class) . '_wrapper';
|
||||
if (!class_exists($wrapped))
|
||||
|
@@ -16,7 +16,7 @@ use PHPUnit\Framework\TestCase;
|
||||
class phpbb_test_case extends TestCase
|
||||
{
|
||||
protected $test_case_helpers;
|
||||
static protected $phpunit_version;
|
||||
protected static $phpunit_version;
|
||||
|
||||
public function __construct($name = NULL, array $data = array(), $dataName = '')
|
||||
{
|
||||
|
Reference in New Issue
Block a user