1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/16748] Enable code sniffing for static placement and adjust code

PHPBB3-16748
This commit is contained in:
Marc Alexander
2021-04-03 23:12:04 +02:00
parent 8518393c46
commit ce08da5165
387 changed files with 459 additions and 459 deletions

View File

@@ -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;

View File

@@ -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();

View File

@@ -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))

View File

@@ -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 = '')
{