@@ -20,7 +20,7 @@ public function test_success()
2020
2121 $ attributes = $ this ->storage [0 ]->getAttributes ();
2222 $ this ->assertCount (1 , $ this ->storage );
23- $ this ->assertEquals ('SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
23+ $ this ->assertEquals ('GET SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
2424 $ this ->assertEquals ('http://example.com/site/index ' , $ attributes ->get (TraceAttributes::URL_FULL ));
2525 $ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
2626 $ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -40,7 +40,7 @@ public function test_non_inline_action()
4040
4141 $ attributes = $ this ->storage [0 ]->getAttributes ();
4242 $ this ->assertCount (1 , $ this ->storage );
43- $ this ->assertEquals ('SiteController.error ' , $ this ->storage [0 ]->getName ());
43+ $ this ->assertEquals ('GET SiteController.error ' , $ this ->storage [0 ]->getName ());
4444 $ this ->assertEquals ('http://example.com/site/error ' , $ attributes ->get (TraceAttributes::URL_FULL ));
4545 $ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
4646 $ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -56,7 +56,7 @@ public function test_exception()
5656
5757 $ attributes = $ this ->storage [0 ]->getAttributes ();
5858 $ this ->assertCount (1 , $ this ->storage );
59- $ this ->assertEquals ('SiteController.actionThrow ' , $ this ->storage [0 ]->getName ());
59+ $ this ->assertEquals ('GET SiteController.actionThrow ' , $ this ->storage [0 ]->getName ());
6060 $ this ->assertEquals ('http://example.com/site/throw ' , $ attributes ->get (TraceAttributes::URL_FULL ));
6161 $ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
6262 $ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -82,7 +82,7 @@ public function test_parent()
8282
8383 $ attributes = $ span ->getAttributes ();
8484 $ this ->assertCount (1 , $ this ->storage );
85- $ this ->assertEquals ('SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
85+ $ this ->assertEquals ('GET SiteController.actionIndex ' , $ this ->storage [0 ]->getName ());
8686 $ this ->assertEquals ('http://example.com/site/index ' , $ attributes ->get (TraceAttributes::URL_FULL ));
8787 $ this ->assertEquals ('GET ' , $ attributes ->get (TraceAttributes::HTTP_REQUEST_METHOD ));
8888 $ this ->assertEquals ('http ' , $ attributes ->get (TraceAttributes::URL_SCHEME ));
@@ -165,17 +165,25 @@ private function runRequest($path)
165165
166166class SiteController extends Controller
167167{
168+ /**
169+ * @return mixed
170+ */
168171 public function actionIndex ()
169172 {
170- return \Yii::createObject ([
173+ /** @var array{class: class-string, format: string, content: string} $config */
174+ $ config = [
171175 'class ' => 'yii\web\Response ' ,
172176 'format ' => \yii \web \Response::FORMAT_RAW ,
173177 'content ' => 'hello ' ,
174- ]);
178+ ];
179+
180+ return \Yii::createObject ($ config );
175181 }
176182
183+ /** @psalm-suppress MoreSpecificReturnType */
177184 public function actions ()
178185 {
186+ /** @psalm-suppress LessSpecificReturnStatement */
179187 return [
180188 'error ' => [
181189 'class ' => 'yii\web\ErrorAction ' ,
0 commit comments