Find the best Rector rule to solve your problem. Searching through 671 rules.

Found 3 rules:

AbortIfRector

Change if abort to abort_if

-if ($condition) {
-    abort(404);
-}
-if (!$condition) {
-    abort(404);
-}
+abort_if($condition, 404);
+abort_unless($condition, 404);

ReportIfRector

Change if report to report_if

-if ($condition) {
-    report(new Exception());
-}
-if (!$condition) {
-    report(new Exception());
-}
+report_if($condition, new Exception());
+report_unless($condition, new Exception());

ThrowIfRector

Change if throw to throw_if

-if ($condition) {
-    throw new Exception();
-}
-if (!$condition) {
-    throw new Exception();
-}
+throw_if($condition, new Exception());
+throw_unless($condition, new Exception());