Run Rector on your code to see what it can do for you:
<?php final class DemoFile
{ public function run() { - if ($value == 0) { - return $value; - } elseif ($formatForEmail) { - $value .= '|' . 1; - - return $time_context . ' // ' . $direction . $value . ' minute(s)'; - } else { + if ($value == 0) { + return $value; + } + if ($formatForEmail) { + $value .= '|' . 1; + return $time_context . ' // ' . $direction . $value . ' minute(s)'; + } + else { return $value; } } }
Applied Rules:
Not a change you expect?
rector.php