Skip to content

Commit 2688276

Browse files
committed
Disable bugged rules
1 parent d4905d7 commit 2688276

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<file>examples</file>
1414
<file>tests</file>
1515
<file>tools</file>
16+
<file>rector.php</file>
1617

1718
<!-- Target minimum supported PHP version -->
1819
<config name="php_version" value="70200"/>

rector.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
use Rector\Config\RectorConfig;
44
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector;
5+
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
6+
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
57
use Rector\Set\ValueObject\LevelSetList;
68

79
return static function (RectorConfig $rectorConfig): void {
@@ -15,7 +17,17 @@
1517
// Modernize code
1618
$rectorConfig->sets([LevelSetList::UP_TO_PHP_72]);
1719

20+
$rectorConfig->skip([
21+
// Falsely detect unassigned variables in code paths stopped by PHPUnit\Framework\Assert::markTestSkipped()
22+
AddDefaultValueForUndefinedVariableRector::class => [
23+
__DIR__ . '/tests/',
24+
],
25+
// @see https://github.com/phpstan/phpstan-src/pull/2429
26+
RemoveExtraParametersRector::class => [
27+
__DIR__ . '/src/Operation/',
28+
],
29+
]);
30+
1831
// All classes are public API by default, unless marked with @internal.
1932
$rectorConfig->ruleWithConfiguration(RemoveAnnotationRector::class, ['api']);
20-
2133
};

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,6 @@ private function createTestCollection(?stdClass $encryptedFields = null, ?stdCla
18911891

18921892
private function encryptCorpusValue(string $fieldName, stdClass $data, ClientEncryption $clientEncryption)
18931893
{
1894-
$encrypted = null;
18951894
$encryptionOptions = [
18961895
'algorithm' => $data->algo === 'rand' ? ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM : ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC,
18971896
];

tests/UnifiedSpecTests/Constraint/Matches.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ private function doToString()
368368
return 'matches ' . $this->exporter()->export($this->value);
369369
}
370370

371+
/** @psalm-return never-return */
371372
private static function failAt(string $message, string $keyPath): void
372373
{
373374
$prefix = empty($keyPath) ? '' : sprintf('Field path "%s": ', $keyPath);

tests/UnifiedSpecTests/Operation.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ public function assert(bool $rethrowExceptions = false): void
172172

173173
private function execute()
174174
{
175-
$result = null;
176175
$this->context->setActiveClient(null);
177176

178177
if ($this->isTestRunnerOperation) {

0 commit comments

Comments
 (0)