-
-
Notifications
You must be signed in to change notification settings - Fork 737
Closed
rectorphp/rector-src
#2822Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.org/demo/52c1e4b7-d37f-49f1-a895-84f8e1f2ed88
<?php
function dummy($can_order_products, $offset, $limit)
{
if (!empty($can_order_products)) {
if (!empty($limit)) {
if (!empty($offset)) {
$can_order_products = array_slice($can_order_products, $offset, $limit);
} else {
$can_order_products = array_slice($can_order_products, 0, $limit);
}
if (!empty($can_order_products)) {
return $can_order_products;
} else {
return false;
}
} else {
return $can_order_products;
}
}
return false;
}Responsible rules
RemoveAlwaysElseRector
Expected Behavior
No syntax error.