Skip to content

Commit bba4be9

Browse files
authored
docs: explain what NoParamTypeRemovalRule does (#65)
1 parent a7fa1c1 commit bba4be9

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ composer require rector/type-perfect --dev
2424

2525
<br>
2626

27-
There are 2 checks enabled out of the box. First one makes sure we don't miss a chance to use `instanceof` to make further code know about exact object type:
27+
There are 3 checks enabled out of the box. First one makes sure we don't miss a chance to use `instanceof` to make further code know about exact object type:
2828

2929
```php
3030
private ?SomeType $someType = null;
@@ -79,6 +79,35 @@ $id = $article->getId();
7979

8080
<br>
8181

82+
Last rule checks that all interface implementations follow the same method signature as the interface:
83+
84+
```php
85+
interface SomeInterface
86+
{
87+
public function doSomething(int $value): void;
88+
}
89+
90+
final class SomeClass implements SomeInterface
91+
{
92+
public function doSomething($value): void { // ... }
93+
}
94+
```
95+
96+
:no_good:
97+
98+
99+
100+
```php
101+
final class SomeClass implements SomeInterface
102+
{
103+
public function doSomething(int $value): void { // ... }
104+
}
105+
```
106+
107+
:heavy_check_mark:
108+
109+
<br>
110+
82111
## Configure
83112

84113
Next rules you can enable by configuration. We take them from the simplest to more powerful, in the same order we apply them on legacy projects.

0 commit comments

Comments
 (0)