Skip to content

Commit

Permalink
Docs regenerated (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfox authored Jan 28, 2024
1 parent 6a9ad4a commit f647f0e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Change method calls from `$this->json` to `$this->postJson,` `$this->putJson,` e

```diff
-$this->json("POST", "/api/v1/users", $data);
+§this->postJson("/api/v1/users", $data);
+$this->postJson("/api/v1/users", $data);
```

<br>
Expand Down Expand Up @@ -704,6 +704,23 @@ Refactor Model `$casts` property with `casts()` method

- class: [`RectorLaravel\Rector\Class_\ModelCastsPropertyToCastsMethodRector`](../src/Rector/Class_/ModelCastsPropertyToCastsMethodRector.php)

```diff
use Illuminate\Database\Eloquent\Model;

class Person extends Model
{
- protected $casts = [
- 'age' => 'integer',
- ];
+ protected function casts(): array
+ {
+ return [
+ 'age' => 'integer',
+ ];
+ }
}
```

<br>

## NotFilledBlankFuncCallToBlankFilledFuncCallRector
Expand Down Expand Up @@ -1103,4 +1120,4 @@ Use `$this->components` property within commands
}
```

<br>
<br>

0 comments on commit f647f0e

Please sign in to comment.