Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 271 Bytes
<?php
#bad
if($age>18 && $gender == "male" && $mondy > 1000){
//do anything
}
#good
public function canTravelToAfrica($age,$gender,$money){
return $age>18 && $gender == "male" && $mondy > 1000;
}
if($this->canTravelToAfrica($age,$gender,$money)){
//do anything
}
You can’t perform that action at this time.