1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-12 02:04:21 +02:00

php8 support

This commit is contained in:
Ne-Lexa
2021-02-22 13:12:01 +03:00
parent 44c2041f62
commit a65fe4579b
118 changed files with 4060 additions and 6568 deletions

View File

@@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* This file is part of the nelexa/zip package.
* (c) Ne-Lexa <https://github.com/Ne-Lexa/php-zip>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhpZip\Tests\Extra\Fields;
use PHPUnit\Framework\TestCase;
@@ -25,25 +34,25 @@ final class Zip64ExtraFieldTest extends TestCase
/**
* @dataProvider provideExtraField
*
* @param int|null $uncompressedSize
* @param int|null $compressedSize
* @param int|null $localHeaderOffset
* @param int|null $diskStart
* @param string|null $localBinaryData
* @param string|null $cdBinaryData
* @noinspection PhpTooManyParametersInspection
*
* @param ?int $uncompressedSize
* @param ?int $compressedSize
* @param ?int $localHeaderOffset
* @param ?int $diskStart
* @param ?string $localBinaryData
* @param ?string $cdBinaryData
*
* @throws ZipException
*
* @noinspection PhpTooManyParametersInspection
*/
public function testExtraField(
$uncompressedSize,
$compressedSize,
$localHeaderOffset,
$diskStart,
$localBinaryData,
$cdBinaryData
) {
?int $uncompressedSize,
?int $compressedSize,
?int $localHeaderOffset,
?int $diskStart,
?string $localBinaryData,
?string $cdBinaryData
): void {
$extraField = new Zip64ExtraField(
$uncompressedSize,
$compressedSize,
@@ -72,10 +81,7 @@ final class Zip64ExtraFieldTest extends TestCase
}
}
/**
* @return array
*/
public function provideExtraField()
public function provideExtraField(): array
{
return [
[
@@ -105,7 +111,7 @@ final class Zip64ExtraFieldTest extends TestCase
];
}
public function testSetter()
public function testSetter(): void
{
$extraField = new Zip64ExtraField();
self::assertNull($extraField->getUncompressedSize());