Skip to content

Commit 024eafb

Browse files
committed
Address Copilot review feedback on PageResponse
1 parent 28f10ce commit 024eafb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/DocScan/Session/Retrieve/PageResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ public function __construct(array $page)
4444
}
4545
}
4646

47-
$this->extractionImageIds = $page['extraction_image_ids'] ?? [];
47+
$this->extractionImageIds = isset($page['extraction_image_ids']) && is_array($page['extraction_image_ids'])
48+
? $page['extraction_image_ids']
49+
: [];
4850
}
4951

5052
/**

tests/DocScan/Session/Retrieve/PageResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testGetFrames()
5353
]);
5454

5555
$this->assertCount(2, $pageResponse->getFrames());
56-
$this->containsOnlyInstancesOf(FrameResponse::class, $pageResponse->getFrames());
56+
$this->assertContainsOnlyInstancesOf(FrameResponse::class, $pageResponse->getFrames());
5757
}
5858

5959
/**

0 commit comments

Comments
 (0)