Simplify AphrontRequest::getStrList()
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/src/aphront/__tests__/AphrontRequestTestCase.php;65bbd24974974672$68-75 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3531
This commit is contained in:
@@ -153,10 +153,7 @@ final class AphrontRequest {
|
|||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
$list = $this->getStr($name);
|
$list = $this->getStr($name);
|
||||||
$list = preg_split('/[\s,]/', $list);
|
$list = preg_split('/[\s,]+/', $list, $limit = -1, PREG_SPLIT_NO_EMPTY);
|
||||||
$list = array_map('trim', $list);
|
|
||||||
$list = array_filter($list, 'strlen');
|
|
||||||
$list = array_values($list);
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user