Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ composer require rector/type-perfect --dev

<br>

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:
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:

```php
private ?SomeType $someType = null;
Expand Down Expand Up @@ -79,6 +79,35 @@ $id = $article->getId();

<br>

Last rule checks that all interface implementations follow the same method signature as the interface:

```php
interface SomeInterface
{
public function doSomething(int $value): void;
}

final class SomeClass implements SomeInterface
{
public function doSomething($value): void { // ... }
}
```

:no_good:


```php
final class SomeClass implements SomeInterface
{
public function doSomething(int $value): void { // ... }
}
```

:heavy_check_mark:

<br>

## Configure

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.
Expand Down