"extract method or function" refactoring is not available
begin and edn of selected code block belong to defferent ctontext,extration is not possible
I want to refactor the following codes into an method :
$hid = $_POST['hid'];
$uid = $_G['uid'];
$username = $_G['username'];
$title = $_POST['title'];
$content = $_POST['content'];
$query = "insert into ".DB::table("hdsoso_house_rent_reply")."(hid,uid,uname,title,content)values(";
$query.="$hid,$uid,'$username','$title','$content'";
$query.=")";
DB::query($query);
|
when I select the code above , right click and select refactor->refactor method of function , show the messages above.