From 3933aee290ef1b8c869c9f93068a51d92bd8499f Mon Sep 17 00:00:00 2001 From: Tigrov Date: Fri, 23 Aug 2024 11:06:29 +0700 Subject: [PATCH] Replace `call_user_func_array` with "First class callable syntax" --- tests/Common/CommonColumnSchemaBuilderTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Common/CommonColumnSchemaBuilderTest.php b/tests/Common/CommonColumnSchemaBuilderTest.php index e5adac2ea..9817a5f40 100644 --- a/tests/Common/CommonColumnSchemaBuilderTest.php +++ b/tests/Common/CommonColumnSchemaBuilderTest.php @@ -12,7 +12,6 @@ use Yiisoft\Db\Tests\Support\TestTrait; use function array_shift; -use function call_user_func_array; abstract class CommonColumnSchemaBuilderTest extends TestCase { @@ -87,7 +86,7 @@ protected function checkBuildString(string $expected, string $type, int|null $le foreach ($calls as $call) { $method = array_shift($call); - call_user_func_array([$builder, $method], $call); + ($builder->$method(...))(...$call); } $this->assertSame($expected, $builder->asString()); @@ -116,7 +115,7 @@ protected function checkCreateColumn(string $expected, string $type, int|null $l foreach ($calls as $call) { $method = array_shift($call); - call_user_func_array([$builder, $method], $call); + ($builder->$method(...))(...$call); } $tableName = '{{%column_schema_builder_types}}';