File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,27 @@ Convert migrations to anonymous classes.
168
168
169
169
<br >
170
170
171
+ ## AssertStatusToAssertMethodRector
172
+
173
+ Change ` assertStatus($statusCode) ` to the equivalent method ` assertOk() ` for example.
174
+
175
+ - class: [ ` RectorLaravel\Rector\MethodCall\AssertStatusToAssertMethodRector ` ] ( ../src/Rector/MethodCall/AssertStatusToAssertMethodRector.php )
176
+
177
+ ``` diff
178
+ use Illuminate\Foundation\Testing\TestCase;
179
+
180
+ final class SomeTest extends TestCase
181
+ {
182
+ public function test(): void
183
+ {
184
+ - $this->get('/')->assertStatus(200);
185
+ + $this->get('/')->assertOk();
186
+ }
187
+ }
188
+ ```
189
+
190
+ <br >
191
+
171
192
## CallOnAppArrayAccessToStandaloneAssignRector
172
193
173
194
Replace magical call on ` $this->app["something"] ` to standalone type assign variable
@@ -247,6 +268,21 @@ Convert DB Expression `__toString()` calls to `getValue()` method calls.
247
268
248
269
<br >
249
270
271
+ ## EmptyToBlankAndFilledFuncRector
272
+
273
+ Convert ` empty() ` calls to ` blank() ` and ` !empty() ` calls to ` filled() ` .
274
+
275
+ - class: [ ` RectorLaravel\Rector\FuncCall\EmptyToBlankAndFilledFuncRector ` ] ( ../src/Rector/FuncCall/EmptyToBlankAndFilledFuncRector.php )
276
+
277
+ ``` diff
278
+ - $empty = empty($value);
279
+ + $empty = blank($value);
280
+ - $notEmpty = !empty($value);
281
+ + $notEmpty = filled($value);
282
+ ```
283
+
284
+ <br >
285
+
250
286
## FactoryApplyingStatesRector
251
287
252
288
Call the state methods directly instead of specify the name of state.
You can’t perform that action at this time.
0 commit comments