@@ -36,6 +36,7 @@ public static function setUpBeforeClass(): void
3636 DB ::swap (self ::$ connectionResolver );
3737
3838 $ migration = include __DIR__ .'/../../../src/Database/Migration/LaravelMysqlWebhookTables.php ' ;
39+ /** @phpstan-ignore-next-line */
3940 $ migration ->up ();
4041 }
4142
@@ -55,6 +56,7 @@ public function tearDown(): void
5556 public static function tearDownAfterClass (): void
5657 {
5758 $ migration = include __DIR__ .'/../../../src/Database/Migration/LaravelMysqlWebhookTables.php ' ;
59+ /** @phpstan-ignore-next-line */
5860 $ migration ->down ();
5961 }
6062
@@ -88,12 +90,10 @@ public function testLoadForDispatching(array $expectedUrls, string $type, array
8890 $ connection = self ::$ connectionResolver ->connection ('default ' );
8991
9092 $ expectedWebhooks = array_map (function (string $ url ) use ($ connection , $ attributes ): Webhook {
91- /** @var \stdClass $dbWebhook */
93+ /** @var object{id: int, type: non-empty-string, listeningUrl: non-empty-string, priority: 50|100|200} $dbWebhook */
9294 $ dbWebhook = $ connection ->selectOne ('select * from Webhook where listeningUrl = ? ' , [$ url ]);
93- /** @var non-empty-string $webhookId */
94- $ webhookId = (string ) $ dbWebhook ->id ;
9595 return new Webhook (
96- $ webhookId ,
96+ ( string ) $ dbWebhook -> id ,
9797 $ dbWebhook ->type ,
9898 new Params (
9999 $ dbWebhook ->listeningUrl ,
@@ -170,23 +170,23 @@ public function testSave(string $type, Params $params): void
170170 $ this ->config
171171 );
172172
173- /** @var Webhook $webhook */
174173 $ webhook = $ repository ->save ($ type , $ params );
175174 self ::assertNotNull ($ webhook );
176175 self ::assertSame ($ type , $ webhook ->type ());
177176 self ::assertEquals ($ params , $ webhook ->params ());
178177
179178 $ connection = self ::$ connectionResolver ->connection ('default ' );
180179
181- /** @var \stdClass $dbWebhook */
180+ /** @var object{id: int, type: string, listeningUrl: string, priority: int} $dbWebhook */
182181 $ dbWebhook = $ connection ->selectOne ('select * from Webhook where id = ? ' , [$ webhook ->id ()]);
183182 self ::assertSame ($ webhook ->id (), (string ) $ dbWebhook ->id );
184183 self ::assertSame ($ type , $ dbWebhook ->type );
185184 self ::assertSame ($ params ->listeningUrl (), $ dbWebhook ->listeningUrl );
186185 self ::assertSame ($ params ->priority (), $ dbWebhook ->priority );
187186
187+ /** @var array<object{webhookId: int, webhookAttributeId: int}> $dbRequiredAttributeMaps */
188188 $ dbRequiredAttributeMaps = $ connection ->select ('select * from WebhookRequiredAttribute where webhookId = ? ' , [$ webhook ->id ()]);
189- /** @var \stdClass $dbWithoutAttribute */
189+ /** @var object{webhookId: int} $dbWithoutAttribute */
190190 $ dbWithoutAttribute = $ connection ->selectOne ('select * from WebhookWithoutAttribute where webhookId = ? ' , [$ webhook ->id ()]);
191191
192192 if (count ($ params ->attributes ()) === 0 ) {
0 commit comments