1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 19:24:01 +02:00

[ticket/16736] Fix static declarations on master

PHPBB3-16736
This commit is contained in:
Máté Bartus
2021-03-24 01:22:27 +01:00
parent 46d2a93ae6
commit 4737da3ec7
8 changed files with 24 additions and 24 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.
*/
public static function get_connection(config_php_file $config) : Connection
static public 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.
*/
public static function get_connection_from_params(
static public 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.
*/
public static function get_configuration(
static public 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.
*/
private static function build_connection_parameters(
static private 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.
*/
private static function build_sqlite_parameters(array $params, string $path, ?string $user, ?string $password) : array
static private 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.
*/
private static function enrich_parameters(array $params) : array
static private 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.
*/
public static function to_doctrine_driver(string $driver_name) : string
static public function to_doctrine_driver(string $driver_name) : string
{
// Normalize driver name.
$name = str_replace('phpbb\db\driver', '', $driver_name);

View File

@@ -240,7 +240,7 @@ class schema_generator
* @param mixed $data Array of values to be set.
* @param callable|null $value_transform Callback to transform the value being set.
*/
private static function set_all(&$schema, $data, ?callable $value_transform = null)
static private function set_all(&$schema, $data, ?callable $value_transform = null)
{
$data = (!is_array($data)) ? [$data] : $data;
foreach ($data as $key => $change)
@@ -262,7 +262,7 @@ class schema_generator
* @param mixed $schema Reference to the schema entry.
* @param mixed $data Array of values to be removed.
*/
private static function unset_all(&$schema, $data)
static private function unset_all(&$schema, $data)
{
$data = (!is_array($data)) ? [$data] : $data;
foreach ($data as $key)
@@ -278,7 +278,7 @@ class schema_generator
* @param string $key The column name to add.
* @param array $change The column data.
*/
private static function handle_add_column(array &$value, string $key, array $change)
static private function handle_add_column(array &$value, string $key, array $change)
{
if (!array_key_exists('after', $change))
{
@@ -317,7 +317,7 @@ class schema_generator
*
* @return Closure|null The value transformation callback or null if it is not needed.
*/
private static function get_value_transform(string $change_type, string $schema_type) : ?Closure
static private function get_value_transform(string $change_type, string $schema_type) : ?Closure
{
if ($change_type !== 'add')
{