Skip to content

Commit db23ced

Browse files
committed
Disable bugged rules
1 parent 3fc6d54 commit db23ced

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

rector.php

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

33
use Rector\Config\RectorConfig;
4+
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
5+
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
46
use Rector\Set\ValueObject\LevelSetList;
57

68
return static function (RectorConfig $rectorConfig): void {
@@ -11,6 +13,16 @@
1113
__DIR__ . '/tools',
1214
]);
1315

14-
// define sets of rules
1516
$rectorConfig->sets([LevelSetList::UP_TO_PHP_72]);
17+
18+
$rectorConfig->skip([
19+
// Falsely detect unassigned variables in code paths stopped by PHPUnit\Framework\Assert::markTestSkipped()
20+
AddDefaultValueForUndefinedVariableRector::class => [
21+
__DIR__ . '/tests/',
22+
],
23+
// @see https://github.com/phpstan/phpstan-src/pull/2429
24+
RemoveExtraParametersRector::class => [
25+
__DIR__ . '/src/Operation/',
26+
],
27+
]);
1628
};

tests/SpecTests/ClientSideEncryptionSpecTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,6 @@ private function createTestCollection(?stdClass $encryptedFields = null, ?stdCla
20172017

20182018
private function encryptCorpusValue(string $fieldName, stdClass $data, ClientEncryption $clientEncryption)
20192019
{
2020-
$encrypted = null;
20212020
$encryptionOptions = [
20222021
'algorithm' => $data->algo === 'rand' ? ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM : ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC,
20232022
];

tests/UnifiedSpecTests/Constraint/Matches.php

+1
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

-1
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)