Skip to content

Commit

Permalink
InlineConstructorDefaultToPropertyRector fix code example (#7465) (#3028
Browse files Browse the repository at this point in the history
)
  • Loading branch information
GeniJaho committed Nov 1, 2022
1 parent 9e4a9c0 commit 6902b17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,12 +848,12 @@ Move property default from constructor to property default
final class SomeClass
{
- private $name;
-
- public function __construct()
- {
- $this->name = 'John';
- }
+ private $name = 'John';

public function __construct()
{
- $this->name = 'John';
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function __construct()
final class SomeClass
{
private $name = 'John';
public function __construct()
{
}
}
CODE_SAMPLE
),
Expand Down

0 comments on commit 6902b17

Please sign in to comment.