Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (28 sloc) 466 Bytes
<?php
function check_output($a){
if($a > 10){
//do something
//do something
//do something
//do something
//do something
//do something
//do something
}else{
//do else
}
}
//****************** Refactoring ***************************
function check_output($a){
if($a < 10){
//do else
return;
}
//do something
//do something
//do something
//do something
//do something
//do something
//do something
}
You can’t perform that action at this time.