Skip to content

Commit 352c986

Browse files
committed
ECS/Rector
1 parent 4822cb8 commit 352c986

File tree

9 files changed

+5
-37
lines changed

9 files changed

+5
-37
lines changed

ecs.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,13 @@
8787
'import_functions' => true,
8888
]);
8989

90-
$config->skip([
91-
PhpUnitTestClassRequiresCoversFixer::class
92-
]);
90+
$config->skip([PhpUnitTestClassRequiresCoversFixer::class]);
9391
$config->parallel();
9492
$config->paths([
9593
__DIR__ . '/performance',
9694
__DIR__ . '/src',
9795
__DIR__ . '/tests',
9896
__DIR__ . '/ecs.php',
9997
__DIR__ . '/rector.php',
100-
__DIR__ . '/monorepo-builder.php',
10198
]);
10299
};

rector.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
<?php
22

33
declare(strict_types=1);
4-
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
5-
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
64

75
use Rector\Config\RectorConfig;
86

97
use Rector\Core\ValueObject\PhpVersion;
10-
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodParameterRector;
118
use Rector\Doctrine\Set\DoctrineSetList;
12-
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
139
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
1410
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
1511
use Rector\PHPUnit\Set\PHPUnitSetList;
1612
use Rector\Set\ValueObject\LevelSetList;
1713
use Rector\Set\ValueObject\SetList;
1814
use Rector\Symfony\Set\SymfonyLevelSetList;
1915
use Rector\Symfony\Set\SymfonySetList;
20-
use Rector\Symfony\Symfony42\Rector\New_\StringToArrayArgumentProcessRector;
2116

2217
return static function (RectorConfig $config): void {
2318
$config->import(SetList::DEAD_CODE);

src/Bundle/JoseFramework/Serializer/JWESerializer.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma
4040
&& $this->formatSupported($format);
4141
}
4242

43-
public function getSupportedTypes(?string $format): array
44-
{
45-
if (! class_exists(JWESerializerManager::class) || ! $this->formatSupported($format)) {
46-
return [];
47-
}
48-
49-
return [
50-
JWE::class => true,
51-
];
52-
}
53-
5443
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWE
5544
{
5645
if ($data instanceof JWE === false) {

src/Bundle/JoseFramework/Serializer/JWSSerializer.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ public function supportsDenormalization(mixed $data, string $type, string $forma
4040
&& $this->formatSupported($format);
4141
}
4242

43-
public function getSupportedTypes(?string $format): array
44-
{
45-
if (! class_exists(JWSSerializerManager::class) || ! $this->formatSupported($format)) {
46-
return [];
47-
}
48-
49-
return [
50-
JWS::class => true,
51-
];
52-
}
53-
5443
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWS
5544
{
5645
if ($data instanceof JWS === false) {

src/Component/Checker/CallableChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Jose\Component\Checker;
66

7-
use function call_user_func;
87
use InvalidArgumentException;
8+
use function call_user_func;
99
use function is_callable;
1010

1111
/**

tests/Component/Encryption/EncrypterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
use InvalidArgumentException;
88
use Jose\Component\Core\JWK;
99
use Jose\Component\Core\JWKSet;
10-
use const JSON_THROW_ON_ERROR;
1110
use ParagonIE\ConstantTime\Base64UrlSafe;
1211
use PHPUnit\Framework\Attributes\Test;
12+
use const JSON_THROW_ON_ERROR;
1313

1414
/**
1515
* @internal

tests/Component/Signature/JWSFlattenedTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use PHPUnit\Framework\Attributes\Test;
88
use const JSON_THROW_ON_ERROR;
9-
use PHPUnit\Framework\Attributes\Test;
109

1110
/**
1211
* @internal

tests/Component/Signature/RFC7520/NestingTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Jose\Tests\Component\Signature\SignatureTestCase;
99
use PHPUnit\Framework\Attributes\Test;
1010
use const JSON_THROW_ON_ERROR;
11-
use PHPUnit\Framework\Attributes\Test;
1211

1312
/**
1413
* @see https://tools.ietf.org/html/rfc7520#section-6

tests/ComposerJsonTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
namespace Jose;
66

77
use DirectoryIterator;
8-
use function in_array;
9-
use const JSON_THROW_ON_ERROR;
108
use PHPUnit\Framework\Attributes\Test;
119
use PHPUnit\Framework\TestCase;
1210
use Traversable;
11+
use function in_array;
12+
use const JSON_THROW_ON_ERROR;
1313

1414
/**
1515
* @internal

0 commit comments

Comments
 (0)