Skip to content

Commit

Permalink
Rebuild docs (#4002)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed May 28, 2023
1 parent 25ae1d8 commit 3fb912c
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 394 Rules Overview
# 393 Rules Overview

<br>

Expand Down Expand Up @@ -44,7 +44,7 @@

- [Php74](#php74) (13)

- [Php80](#php80) (20)
- [Php80](#php80) (19)

- [Php81](#php81) (12)

Expand Down Expand Up @@ -5987,37 +5987,6 @@ Add `Stringable` interface to classes with `__toString()` method

<br>

### TokenGetAllToObjectRector

Convert `token_get_all` to `PhpToken::tokenize`

- class: [`Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector`](../rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php)

```diff
final class SomeClass
{
public function run()
{
- $tokens = token_get_all($code);
- foreach ($tokens as $token) {
- if (is_array($token)) {
- $name = token_name($token[0]);
- $text = $token[1];
- } else {
- $name = null;
- $text = $token;
- }
+ $tokens = \PhpToken::tokenize($code);
+ foreach ($tokens as $phpToken) {
+ $name = $phpToken->getTokenName();
+ $text = $phpToken->text;
}
}
}
```

<br>

### UnionTypesRector

Change docs types to union types, where possible (properties are covered by TypedPropertiesRector)
Expand Down

0 comments on commit 3fb912c

Please sign in to comment.