1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +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

@@ -37,7 +37,7 @@ class connection_factory
* @throws runtime_exception If the database connection could not be established.
* @throws InvalidArgumentException If the provided driver name is not a valid phpBB database driver.
*/
static public function get_connection(config_php_file $config) : Connection
public static function get_connection(config_php_file $config) : Connection
{
$driver = $config->get('dbms');
$host = $config->get('dbhost');
@@ -71,7 +71,7 @@ class connection_factory
* @throws runtime_exception If the database connection could not be established.
* @throws InvalidArgumentException If $driver is not a valid phpBB database driver.
*/
static public function get_connection_from_params(
public static function get_connection_from_params(
string $driver,
string $host,
?string $user = null,

View File

@@ -34,7 +34,7 @@ class connection_parameter_factory
*
* @throws InvalidArgumentException If a required parameter is empty or null.
*/
static public function get_configuration(
public static function get_configuration(
string $driver,
string $host,
?string $user = null,
@@ -70,7 +70,7 @@ class connection_parameter_factory
*
* @throws InvalidArgumentException If a required parameter is empty or null.
*/
static private function build_connection_parameters(
private static function build_connection_parameters(
array $params,
string $host,
?string $user = null,
@@ -119,7 +119,7 @@ class connection_parameter_factory
*
* @return array Doctrine's DBAL configuration for SQLite.
*/
static private function build_sqlite_parameters(array $params, string $path, ?string $user, ?string $password) : array
private static function build_sqlite_parameters(array $params, string $path, ?string $user, ?string $password) : array
{
$params['path'] = $path;
@@ -143,7 +143,7 @@ class connection_parameter_factory
*
* @return array The enriched parameter list.
*/
static private function enrich_parameters(array $params) : array
private static function enrich_parameters(array $params) : array
{
$enrichment_tags = [
'pdo_mysql' => [

View File

@@ -29,7 +29,7 @@ trait driver_convertor
*
* @throws InvalidArgumentException If $driver_name is not a valid phpBB database driver.
*/
static public function to_doctrine_driver(string $driver_name) : string
public static function to_doctrine_driver(string $driver_name) : string
{
// Normalize driver name.
$name = str_replace('phpbb\db\driver', '', $driver_name);