Skip to content

Commit

Permalink
Remove RenderMethodParamToTypeDeclarationRector, based on specific me…
Browse files Browse the repository at this point in the history
…thod that is not related with netter, rather custom rule (#85)
  • Loading branch information
TomasVotruba authored Aug 7, 2022
1 parent 12bb575 commit 17faf3f
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 269 deletions.
10 changes: 0 additions & 10 deletions config/sets/nette-strict.php

This file was deleted.

45 changes: 1 addition & 44 deletions docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 30 Rules Overview
# 28 Rules Overview

## BuilderExpandToHelperExpandRector

Expand Down Expand Up @@ -477,29 +477,6 @@ Renames method calls in NEON configs

<br>

## RenderMethodParamToTypeDeclarationRector

Move `@param` declarations on `render()` method in Nette components and presenter to strict type declarations

- class: [`Rector\Nette\Rector\ClassMethod\RenderMethodParamToTypeDeclarationRector`](../src/Rector/ClassMethod/RenderMethodParamToTypeDeclarationRector.php)

```diff
use Nette\Application\UI\Control;

final class SomeControl extends Control
{
- /**
- * @param string $name
- */
- public function render($name)
+ public function render(string $name)
{
}
}
```

<br>

## ReplaceEventManagerWithEventSubscriberRector

Change Kdyby EventManager to EventDispatcher
Expand Down Expand Up @@ -594,26 +571,6 @@ Change setClass with class and arguments to separated methods

<br>

## StrposToStringsContainsRector

Use `Nette\Utils\Strings` over bare string-functions

- class: [`Rector\Nette\Rector\NotIdentical\StrposToStringsContainsRector`](../src/Rector/NotIdentical/StrposToStringsContainsRector.php)

```diff
class SomeClass
{
public function run()
{
$name = 'Hi, my name is Tom';
- return strpos($name, 'Hi') !== false;
+ return \Nette\Utils\Strings::contains($name, 'Hi');
}
}
```

<br>

## SubstrStrlenFunctionToNetteUtilsStringsRector

Use `Nette\Utils\Strings` over bare string-functions
Expand Down
120 changes: 0 additions & 120 deletions src/Rector/ClassMethod/RenderMethodParamToTypeDeclarationRector.php

This file was deleted.

5 changes: 0 additions & 5 deletions src/Set/NetteSetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ final class NetteSetList implements SetListInterface
*/
final public const NETTE_CODE_QUALITY = __DIR__ . '/../../config/sets/nette-code-quality.php';

/**
* @var string
*/
final public const NETTE_STRICT = __DIR__ . '/../../config/sets/nette-strict.php';

/**
* @var string
*/
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 17faf3f

Please sign in to comment.