Find the best Rector rule to solve your problem. Searching through 842 rules.
Found 4 rules:
refactors calls with the pre Laravel 11 methods for blueprint geometry columns
-$blueprint->point('coordinates')->spatialIndex();
+$blueprint->geometry('coordinates', 'point')->spatialIndex();
Replace assertSee with assertSeeHtml when testing HTML with escape set to false
-$response->assertSee("<li>foo</li>", false);
+$response->assertSeeHtml("<li>foo</li>");
Replace Dispatchable, InteractsWithQueue, Queueable, and SerializesModels traits with the Queueable trait
use Illuminate\Bus\Queueable;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class SomeJob
{
- use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+ use \Illuminate\Foundation\Queue\Queueable;
}
Refactor Model $casts property with casts() method
use Illuminate\Database\Eloquent\Model;
class Person extends Model
{
- protected $casts = [
- 'age' => 'integer',
- ];
+ protected function casts(): array
+ {
+ return [
+ 'age' => 'integer',
+ ];
+ }
}