Skip to content

Commit c0a0b71

Browse files
committed
Use named arguments for annotations
1 parent 9fac33f commit c0a0b71

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/test/php/lang/ast/unittest/emit/ArgumentPromotionTest.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function __construct(private int $id, private string $name) { }
8383
);
8484
}
8585

86-
#[Test, Expect(['class' => Errors::class, 'withMessage' => 'Variadic parameters cannot be promoted'])]
86+
#[Test, Expect(class: Errors::class, withMessage: 'Variadic parameters cannot be promoted')]
8787
public function variadic_parameters_cannot_be_promoted() {
8888
$this->type('class <T> {
8989
public function __construct(private string... $in) { }

src/test/php/lang/ast/unittest/emit/ControlStructuresTest.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function run($arg) {
136136
Assert::equals('10+ items', $r);
137137
}
138138

139-
#[Test, Expect(['class' => Throwable::class, 'withMessage' => '/Unhandled match value of type .+/'])]
139+
#[Test, Expect(class: Throwable::class, withMessage: '/Unhandled match value of type .+/')]
140140
public function unhandled_match() {
141141
$this->run('class <T> {
142142
public function run($arg) {
@@ -149,7 +149,7 @@ public function run($arg) {
149149
}', SEEK_END);
150150
}
151151

152-
#[Test, Expect(['class' => Throwable::class, 'withMessage' => '/Unknown seek mode .+/'])]
152+
#[Test, Expect(class: Throwable::class, withMessage: '/Unknown seek mode .+/')]
153153
public function match_with_throw_expression() {
154154
$this->run('class <T> {
155155
public function run($arg) {

src/test/php/lang/ast/unittest/loader/CompilingClassLoaderTest.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function load_uri() {
101101
Assert::equals('Tests', $class->getSimpleName());
102102
}
103103

104-
#[Test, Expect(['class' => ClassFormatException::class, 'withMessage' => 'Compiler error: Expected "{", have "(end)"'])]
104+
#[Test, Expect(class: ClassFormatException::class, withMessage: 'Compiler error: Expected "{", have "(end)"')]
105105
public function load_class_with_syntax_errors() {
106106
$this->compile(['Errors' => "<?php\nclass"], function($loader, $types) { return $loader->loadClass($types['Errors']); });
107107
}

0 commit comments

Comments
 (0)