mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 16:30:51 +00:00
[automated] Re-Generate Nodes/Rectors Documentation (#2385)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
This commit is contained in:
parent
012e9ad553
commit
9cd69c2b3d
|
@ -1,4 +1,4 @@
|
|||
# 512 Rules Overview
|
||||
# 513 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
|||
|
||||
- [Arguments](#arguments) (5)
|
||||
|
||||
- [CodeQuality](#codequality) (72)
|
||||
- [CodeQuality](#codequality) (73)
|
||||
|
||||
- [CodingStyle](#codingstyle) (35)
|
||||
|
||||
|
@ -915,6 +915,25 @@ Change inline if to explicit if
|
|||
|
||||
<br>
|
||||
|
||||
### InlineIsAInstanceOfRector
|
||||
|
||||
Change `is_a()` with object and class name check to instanceof
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\FuncCall\InlineIsAInstanceOfRector`](../rules/CodeQuality/Rector/FuncCall/InlineIsAInstanceOfRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run(object $object)
|
||||
{
|
||||
- return is_a($object, SomeType::class);
|
||||
+ return $object instanceof SomeType;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### IntvalToTypeCastRector
|
||||
|
||||
Change `intval()` to faster and readable (int) `$value`
|
||||
|
|
Loading…
Reference in New Issue
Block a user