Skip to content

Commit

Permalink
Remove dependency on getdkan/contracts (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-m authored Dec 16, 2024
1 parent 581ef81 commit 8b19c12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"require": {
"php": ">=7.4 <8.4",
"ext-curl": "*",
"getdkan/procrastinator": "^5.0.2",
"getdkan/procrastinator": "^5.0.3",
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5"
},
"require-dev": {
"getdkan/contracts": "^1.2",
"getdkan/mock-chain": "^1.3.6",
"mikey179/vfsstream": "^1.6.11",
"phpunit/phpunit": "^9.6",
"rector/rector": "^0.15.18",
"rector/rector": "^1@stable",
"squizlabs/php_codesniffer": "^3.7",
"symfony/phpunit-bridge": "^7.0"
},
Expand Down
7 changes: 1 addition & 6 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/test',
__DIR__ . '/rector.php',
]);

$rectorConfig->sets([
Expand All @@ -26,14 +25,10 @@
]);

$rectorConfig->skip([
// Don't throw errors on JSON parse problems. Yet.
// @todo Throw errors and deal with them appropriately.
JsonThrowOnErrorRector::class,
// We like our tags. Please don't remove them.
RemoveUselessParamTagRector::class,
RemoveUselessReturnTagRector::class,
RemoveUselessVarTagRector::class,
ArrayShapeFromConstantArrayReturnRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Processor/AbstractChunkedProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function copy(array $state, Result $result, int $timeLimit = PHP_INT_MAX)
return ['state' => $state, 'result' => $result];
}

private function validateWrite(int $bytesWritten, string $chunk, string $source, string $destination)
private function validateWrite(int $bytesWritten, string $chunk, string $source, string $destination): void
{
if ($bytesWritten !== strlen($chunk)) {
throw new \RuntimeException(
Expand Down

0 comments on commit 8b19c12

Please sign in to comment.