Skip to content

Commit 9a34ddc

Browse files
committed
fixed PHPStan errors
1 parent eac9012 commit 9a34ddc

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

tests/Samples/Info/SampleProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static function samples(): iterable {
2424
throw new RuntimeException();
2525
}
2626

27-
/** @var object{version: float, password: ?string, title: ?string, producer: ?string, author: ?string, creator: ?string, creationDate: ?\DateTimeImmutable, modificationDate: ?\DateTimeImmutable, pages: list<object{content: string, images?: string[]}>} $content */
27+
/** @var object{version: float, password: ?string, title: ?string, producer: ?string, author: ?string, creator: ?string, creationDate: ?\DateTimeImmutable, modificationDate: ?\DateTimeImmutable, pages: list<object{content: string, images?: string[]}>, textPartsExpectedSomewhereInTheExtractedText: string[]|null} $content */
2828
$content = Yaml::parseFile($contentsPath, Yaml::PARSE_OBJECT_FOR_MAP | Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE | Yaml::PARSE_DATETIME);
2929
if ($content->password !== null) {
3030
continue;

tests/Samples/SamplesTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ public function testExternalSourcePDFs(FileInfo $fileInfo): void {
2222
$document = (new PdfParser())->parseFile($fileInfo->pdfPath);
2323

2424
// PDF version
25-
if (null !== $document->version) {
26-
static::assertSame(Version::from(number_format($fileInfo->version / 10, 1)), $document->version);
27-
}
25+
static::assertSame(Version::from(number_format($fileInfo->version / 10, 1)), $document->version);
2826

2927
// title
3028
if (null !== $fileInfo->title) {

0 commit comments

Comments
 (0)