@@ -20,7 +20,7 @@ public function test_success()
20
20
21
21
$ attributes = $ this ->storage [0 ]->getAttributes ();
22
22
$ this ->assertCount (1 , $ this ->storage );
23
- $ this ->assertEquals ('SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
23
+ $ this ->assertEquals ('GET SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
24
24
$ this ->assertEquals ('http://example.com/site/index ' , $ attributes ->get (TraceAttributes::URL_FULL ));
25
25
$ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
26
26
$ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -40,7 +40,7 @@ public function test_non_inline_action()
40
40
41
41
$ attributes = $ this ->storage [0 ]->getAttributes ();
42
42
$ this ->assertCount (1 , $ this ->storage );
43
- $ this ->assertEquals ('SiteController.error ' , $ this ->storage [0 ]->getName ());
43
+ $ this ->assertEquals ('GET SiteController.error ' , $ this ->storage [0 ]->getName ());
44
44
$ this ->assertEquals ('http://example.com/site/error ' , $ attributes ->get (TraceAttributes::URL_FULL ));
45
45
$ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
46
46
$ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -56,7 +56,7 @@ public function test_exception()
56
56
57
57
$ attributes = $ this ->storage [0 ]->getAttributes ();
58
58
$ this ->assertCount (1 , $ this ->storage );
59
- $ this ->assertEquals ('SiteController.actionThrow ' , $ this ->storage [0 ]->getName ());
59
+ $ this ->assertEquals ('GET SiteController.actionThrow ' , $ this ->storage [0 ]->getName ());
60
60
$ this ->assertEquals ('http://example.com/site/throw ' , $ attributes ->get (TraceAttributes::URL_FULL ));
61
61
$ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
62
62
$ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -82,7 +82,7 @@ public function test_parent()
82
82
83
83
$ attributes = $ span ->getAttributes ();
84
84
$ this ->assertCount (1 , $ this ->storage );
85
- $ this ->assertEquals ('SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
85
+ $ this ->assertEquals ('GET SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
86
86
$ this ->assertEquals ('http://example.com/site/index ' , $ attributes ->get (TraceAttributes::URL_FULL ));
87
87
$ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
88
88
$ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -165,17 +165,25 @@ private function runRequest($path)
165
165
166
166
class SiteController extends Controller
167
167
{
168
+ /**
169
+ * @return mixed
170
+ */
168
171
public function actionIndex ()
169
172
{
170
- return \Yii::createObject ([
173
+ /** @var array{class: class-string, format: string, content: string} $config */
174
+ $ config = [
171
175
'class ' => 'yii\web\Response ' ,
172
176
'format ' => \yii \web \Response::FORMAT_RAW ,
173
177
'content ' => 'hello ' ,
174
- ]);
178
+ ];
179
+
180
+ return \Yii::createObject ($ config );
175
181
}
176
182
183
+ /** @psalm-suppress MoreSpecificReturnType */
177
184
public function actions ()
178
185
{
186
+ /** @psalm-suppress LessSpecificReturnStatement */
179
187
return [
180
188
'error ' => [
181
189
'class ' => 'yii\web\ErrorAction ' ,
0 commit comments