Skip to content

Commit

Permalink
Replace call_user_func_array with "First class callable syntax"
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Aug 23, 2024
1 parent 127f1f1 commit 3933aee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/Common/CommonColumnSchemaBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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}}';
Expand Down

0 comments on commit 3933aee

Please sign in to comment.