Skip to content

Commit

Permalink
[automated] Re-Generate Nodes/Rectors Documentation (#2956)
Browse files Browse the repository at this point in the history
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
  • Loading branch information
TomasVotruba and TomasVotruba committed Sep 25, 2022
1 parent 6b3ce0a commit 643c444
Showing 1 changed file with 61 additions and 2 deletions.
63 changes: 61 additions & 2 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 395 Rules Overview
# 398 Rules Overview

<br>

## Categories

- [Arguments](#arguments) (5)

- [CodeQuality](#codequality) (72)
- [CodeQuality](#codequality) (75)

- [CodingStyle](#codingstyle) (36)

Expand Down Expand Up @@ -385,6 +385,25 @@ Negated identical boolean compare to not identical compare (does not apply to no

<br>

### BoolvalToTypeCastRector

Change `boolval()` to faster and readable (bool) `$value`

- class: [`Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php)

```diff
class SomeClass
{
public function run($value)
{
- return boolval($value);
+ return (bool) $value;
}
}
```

<br>

### CallUserFuncWithArrowFunctionToInlineRector

Refactor `call_user_func()` with arrow function to direct call
Expand Down Expand Up @@ -674,6 +693,27 @@ Flip type control to use exclusive type

<br>

### FloatvalToTypeCastRector

Change `floatval()` and `doubleval()` to faster and readable (float) `$value`

- class: [`Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php)

```diff
class SomeClass
{
public function run($value)
{
- $a = floatval($value);
- $b = doubleval($value);
+ $a = (float) $value;
+ $b = (float) $value;
}
}
```

<br>

### ForRepeatedCountToOwnVariableRector

Change `count()` in for function to own variable
Expand Down Expand Up @@ -1539,6 +1579,25 @@ Changes strlen comparison to 0 to direct empty string compare

<br>

### StrvalToTypeCastRector

Change `strval()` to faster and readable (string) `$value`

- class: [`Rector\CodeQuality\Rector\FuncCall\StrvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/StrvalToTypeCastRector.php)

```diff
class SomeClass
{
public function run($value)
{
- return strval($value);
+ return (string) $value;
}
}
```

<br>

### SwitchNegatedTernaryRector

Switch negated ternary condition rector
Expand Down

0 comments on commit 643c444

Please sign in to comment.