Skip to content

Commit

Permalink
Remove rule DataProviderArrayItemsNewlinedRector.php (#5227)
Browse files Browse the repository at this point in the history
Co-authored-by: Erison Silva <erison.silva@power.cloud>
  • Loading branch information
eerison and Erison Silva committed Nov 7, 2023
1 parent 6d80745 commit ce62c63
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 304 deletions.
36 changes: 2 additions & 34 deletions build/target-repository/docs/rector_rules_overview.md
@@ -1,4 +1,4 @@
# 356 Rules Overview
# 355 Rules Overview

<br>

Expand All @@ -8,7 +8,7 @@

- [CodeQuality](#codequality) (72)

- [CodingStyle](#codingstyle) (29)
- [CodingStyle](#codingstyle) (28)

- [DeadCode](#deadcode) (42)

Expand Down Expand Up @@ -1720,38 +1720,6 @@ Change count array comparison to empty array comparison to improve performance

<br>

### DataProviderArrayItemsNewlinedRector

Change data provider in PHPUnit test case to newline per item

- class: [`Rector\CodingStyle\Rector\ClassMethod\DataProviderArrayItemsNewlinedRector`](../rules/CodingStyle/Rector/ClassMethod/DataProviderArrayItemsNewlinedRector.php)

```diff
use PHPUnit\Framework\TestCase;

final class ImageBinaryTest extends TestCase
{
/**
* @dataProvider provideData()
*/
public function testGetBytesSize(string $content, int $number): void
{
// ...
}

public static function provideData(): array
{
- return [['content', 8], ['content123', 11]];
+ return [
+ ['content', 8],
+ ['content123', 11]
+ ];
}
}
```

<br>

### EncapsedStringsToSprintfRector

Convert enscaped {$string} to more readable sprintf or concat, if no mask is used
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions rules/CodingStyle/Rector/If_/NullableCompareToNullRector.php
Expand Up @@ -82,7 +82,7 @@ private function isNullableNonScalarType(Expr $expr): bool
$nativeType = $this->nodeTypeResolver->getNativeType($expr);

// is non-nullable?
if (!TypeCombinator::containsNull($nativeType)) {
if (! TypeCombinator::containsNull($nativeType)) {
return false;
}

Expand All @@ -98,6 +98,7 @@ private function isNullableNonScalarType(Expr $expr): bool
}

$nativeType = TypeCombinator::removeNull($nativeType);
return !$nativeType->isScalar()->yes();
return ! $nativeType->isScalar()
->yes();
}
}
2 changes: 0 additions & 2 deletions utils/Command/MissingInSetCommand.php
Expand Up @@ -5,7 +5,6 @@
namespace Rector\Utils\Command;

use Nette\Utils\Strings;
use Rector\CodingStyle\Rector\ClassMethod\DataProviderArrayItemsNewlinedRector;
use Rector\CodingStyle\Rector\Switch_\BinarySwitchToIfElseRector;
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
Expand All @@ -31,7 +30,6 @@ final class MissingInSetCommand extends Command
ConfigurableRectorInterface::class,
DeclareStrictTypesRector::class,
// optional
DataProviderArrayItemsNewlinedRector::class,
BinaryOpNullableToInstanceofRector::class,
WhileNullableToInstanceofRector::class,
// collectors
Expand Down

0 comments on commit ce62c63

Please sign in to comment.