Skip to content

Commit

Permalink
Disable bugged rules
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed May 31, 2023
1 parent 3fc6d54 commit 7da6c97
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
14 changes: 13 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

use Rector\Config\RectorConfig;
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Set\ValueObject\LevelSetList;

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

// define sets of rules
$rectorConfig->sets([LevelSetList::UP_TO_PHP_72]);

$rectorConfig->skip([
// Falsely detect unassigned variables in code paths stopped by PHPUnit\Framework\Assert::markTestSkipped()
AddDefaultValueForUndefinedVariableRector::class => [
__DIR__ . '/tests/',
],
// @see https://github.com/phpstan/phpstan-src/pull/2429
RemoveExtraParametersRector::class => [
__DIR__ . '/src/Operation/',
],
]);
};
1 change: 0 additions & 1 deletion tests/SpecTests/ClientSideEncryptionSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,6 @@ private function createTestCollection(?stdClass $encryptedFields = null, ?stdCla

private function encryptCorpusValue(string $fieldName, stdClass $data, ClientEncryption $clientEncryption)
{
$encrypted = null;
$encryptionOptions = [
'algorithm' => $data->algo === 'rand' ? ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_RANDOM : ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC,
];
Expand Down
1 change: 1 addition & 0 deletions tests/UnifiedSpecTests/Constraint/Matches.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ private function doToString()
return 'matches ' . $this->exporter()->export($this->value);
}

/** @psalm-return never-return */
private static function failAt(string $message, string $keyPath): void
{
$prefix = empty($keyPath) ? '' : sprintf('Field path "%s": ', $keyPath);
Expand Down
2 changes: 0 additions & 2 deletions tests/UnifiedSpecTests/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public function __construct(stdClass $o, Context $context)
public function assert(bool $rethrowExceptions = false): void
{
$error = null;
$result = null;
$saveResultAsEntity = null;

try {
Expand Down Expand Up @@ -172,7 +171,6 @@ public function assert(bool $rethrowExceptions = false): void

private function execute()
{
$result = null;
$this->context->setActiveClient(null);

if ($this->isTestRunnerOperation) {
Expand Down

0 comments on commit 7da6c97

Please sign in to comment.