Skip to content

Commit

Permalink
Merge pull request #9 from indy2kro/dependabot/composer/rector/rector…
Browse files Browse the repository at this point in the history
…-2.0.8

Bump rector/rector from 2.0.7 to 2.0.8
  • Loading branch information
indy2kro authored Feb 8, 2025
2 parents b9ab24e + a5a7584 commit ee723a4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions tests/IsoFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ public function testDescriptorsTestDirIso(): void
$this->assertSame('CDROM', $primaryVolumeDescriptor->volumeId);
$this->assertSame(198, $primaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM', $primaryVolumeDescriptor->appId);
$this->assertNotNull($primaryVolumeDescriptor->creationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->creationDate);
$this->assertSame(Carbon::create(2025, 1, 15, 9, 41, 36, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->creationDate->toDateTimeString());
$this->assertNotNull($primaryVolumeDescriptor->modificationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->modificationDate);
$this->assertSame(Carbon::create(2025, 1, 15, 9, 41, 36, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->modificationDate->toDateTimeString());
$this->assertNull($primaryVolumeDescriptor->expirationDate);
$this->assertNotNull($primaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->expirationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->effectiveDate);
$this->assertSame(Carbon::create(2025, 1, 15, 9, 41, 36, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->effectiveDate->toDateTimeString());

// check root directory
$rootDirectory = $primaryVolumeDescriptor->rootDirectory;
$this->assertSame('.', $rootDirectory->fileId);
$this->assertTrue($rootDirectory->isDirectory());
$this->assertNotNull($rootDirectory->recordingDate);
$this->assertInstanceOf(Carbon::class, $rootDirectory->recordingDate);
$this->assertSame(Carbon::create(2025, 1, 15, 9, 41, 9, 'Europe/Paris')?->toDateTimeString(), $rootDirectory->recordingDate->toDateTimeString());

// check path table
Expand Down Expand Up @@ -182,19 +182,19 @@ public function testDescriptorsSubdirIso(): void
$this->assertSame('CDROM', $primaryVolumeDescriptor->volumeId);
$this->assertSame(181, $primaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM', $primaryVolumeDescriptor->appId);
$this->assertNotNull($primaryVolumeDescriptor->creationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->creationDate);
$this->assertSame(Carbon::create(2025, 1, 15, 16, 7, 41, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->creationDate->toDateTimeString());
$this->assertNotNull($primaryVolumeDescriptor->modificationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->modificationDate);
$this->assertSame(Carbon::create(2025, 1, 15, 16, 7, 41, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->modificationDate->toDateTimeString());
$this->assertNull($primaryVolumeDescriptor->expirationDate);
$this->assertNotNull($primaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->expirationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->effectiveDate);
$this->assertSame(Carbon::create(2025, 1, 15, 16, 7, 41, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->effectiveDate->toDateTimeString());

// check root directory
$rootDirectory = $primaryVolumeDescriptor->rootDirectory;
$this->assertSame('.', $rootDirectory->fileId);
$this->assertTrue($rootDirectory->isDirectory());
$this->assertNotNull($rootDirectory->recordingDate);
$this->assertInstanceOf(Carbon::class, $rootDirectory->recordingDate);
$this->assertSame(Carbon::create(2025, 1, 15, 16, 7, 30, 'Europe/Paris')?->toDateTimeString(), $rootDirectory->recordingDate->toDateTimeString());

// check path table
Expand Down Expand Up @@ -284,10 +284,10 @@ public function testDescriptorsDosIso(): void
$this->assertSame('DOS4.01', $primaryVolumeDescriptor->volumeId);
$this->assertSame(848, $primaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('', $primaryVolumeDescriptor->appId);
$this->assertNull($primaryVolumeDescriptor->creationDate);
$this->assertNull($primaryVolumeDescriptor->modificationDate);
$this->assertNull($primaryVolumeDescriptor->expirationDate);
$this->assertNull($primaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->creationDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->modificationDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->expirationDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->effectiveDate);

/** @var Boot $bootDescriptor */
$bootDescriptor = $isoFile->descriptors[Type::BOOT_RECORD_DESC];
Expand All @@ -312,10 +312,10 @@ public function testDescriptorsDosIso(): void
$this->assertSame(848, $supplementaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('', $supplementaryVolumeDescriptor->appId);
$this->assertSame(3, $supplementaryVolumeDescriptor->jolietLevel);
$this->assertNull($supplementaryVolumeDescriptor->creationDate);
$this->assertNull($supplementaryVolumeDescriptor->modificationDate);
$this->assertNull($supplementaryVolumeDescriptor->expirationDate);
$this->assertNull($supplementaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->creationDate);
$this->assertNotInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->modificationDate);
$this->assertNotInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->expirationDate);
$this->assertNotInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->effectiveDate);
}

public function testDescriptorsIso9660HfsPartIso(): void
Expand Down
26 changes: 13 additions & 13 deletions tests/IsoFileTestUdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public function testDescriptorsTestIso(): void
$this->assertSame('PHP_ISO_FILE', $primaryVolumeDescriptor->volumeId);
$this->assertSame(599, $primaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('IMGBURN V2.5.8.0 - THE ULTIMATE IMAGE BURNER!', $primaryVolumeDescriptor->appId);
$this->assertNotNull($primaryVolumeDescriptor->creationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->creationDate);
$this->assertSame(Carbon::create(2025, 1, 12, 15, 0, 53, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->creationDate->toDateTimeString());
$this->assertNotNull($primaryVolumeDescriptor->modificationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->modificationDate);
$this->assertSame(Carbon::create(2025, 1, 12, 15, 0, 53, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->modificationDate->toDateTimeString());
$this->assertNull($primaryVolumeDescriptor->expirationDate);
$this->assertNull($primaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->expirationDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->effectiveDate);

// check root directory
$rootDirectory = $primaryVolumeDescriptor->rootDirectory;
Expand All @@ -78,7 +78,7 @@ public function testDescriptorsTestIso(): void
$this->assertFalse($rootDirectory->isMultiExtent());
$this->assertTrue($rootDirectory->isThis());
$this->assertFalse($rootDirectory->isParent());
$this->assertNotNull($rootDirectory->recordingDate);
$this->assertInstanceOf(Carbon::class, $rootDirectory->recordingDate);
$this->assertSame(Carbon::create(2025, 1, 12, 15, 0, 53, 'Europe/Paris')?->toDateTimeString(), $rootDirectory->recordingDate->toDateTimeString());

// check path table
Expand Down Expand Up @@ -191,12 +191,12 @@ public function testDescriptorsIso9660UdfIso(): void
$this->assertSame('UDF Bridge', $primaryVolumeDescriptor->volumeId);
$this->assertSame(460, $primaryVolumeDescriptor->volumeSpaceSize);
$this->assertSame('GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM', $primaryVolumeDescriptor->appId);
$this->assertNotNull($primaryVolumeDescriptor->creationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->creationDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->creationDate->toDateTimeString());
$this->assertNotNull($primaryVolumeDescriptor->modificationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->modificationDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->modificationDate->toDateTimeString());
$this->assertNull($primaryVolumeDescriptor->expirationDate);
$this->assertNotNull($primaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $primaryVolumeDescriptor->expirationDate);
$this->assertInstanceOf(Carbon::class, $primaryVolumeDescriptor->effectiveDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $primaryVolumeDescriptor->effectiveDate->toDateTimeString());

/** @var SupplementaryVolume $supplementaryVolumeDescriptor */
Expand All @@ -214,12 +214,12 @@ public function testDescriptorsIso9660UdfIso(): void
$this->assertSame(460, $supplementaryVolumeDescriptor->volumeSpaceSize);
// TODO - fix encoding
// $this->assertSame('GENISOIMAGE ISO 9660_HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE', $supplementaryVolumeDescriptor->appId);
$this->assertNotNull($supplementaryVolumeDescriptor->creationDate);
$this->assertInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->creationDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $supplementaryVolumeDescriptor->creationDate->toDateTimeString());
$this->assertNotNull($supplementaryVolumeDescriptor->modificationDate);
$this->assertInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->modificationDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $supplementaryVolumeDescriptor->modificationDate->toDateTimeString());
$this->assertNull($supplementaryVolumeDescriptor->expirationDate);
$this->assertNotNull($supplementaryVolumeDescriptor->effectiveDate);
$this->assertNotInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->expirationDate);
$this->assertInstanceOf(Carbon::class, $supplementaryVolumeDescriptor->effectiveDate);
$this->assertSame(Carbon::create(2022, 4, 7, 20, 31, 13, 'Europe/Paris')?->toDateTimeString(), $supplementaryVolumeDescriptor->effectiveDate->toDateTimeString());

// TODO - add assert for UDF volumes
Expand Down
6 changes: 3 additions & 3 deletions tests/Util/IsoDateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testInit7InvalidDate(): void

$date = IsoDate::init7($buffer, $offset);

$this->assertNull($date);
$this->assertNotInstanceOf(Carbon::class, $date);
$this->assertSame(7, $offset);
}

Expand All @@ -39,7 +39,7 @@ public function testInit17ValidDate(): void
$buffer = array_map('ord', str_split('2023051510304516')); // Represents 2023-05-15 10:30:45.16 UTC
$offset = 0;
$expectedDate = Carbon::create(2023, 5, 15, 10, 30, 45, 0);
$this->assertNotNull($expectedDate);
$this->assertInstanceOf(Carbon::class, $expectedDate);
$expectedDate->addMilliseconds(16);

$date = IsoDate::init17($buffer, $offset);
Expand All @@ -56,7 +56,7 @@ public function testInit17InvalidDate(): void

$date = IsoDate::init17($buffer, $offset);

$this->assertNull($date);
$this->assertNotInstanceOf(Carbon::class, $date);
$this->assertSame(17, $offset);
}
}

0 comments on commit ee723a4

Please sign in to comment.