1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Simplify one "array_keys/range" -> "phutil_is_natural_list()" in "phabricator/"

Summary: Depends on D20213. Simplify this idiom.

Test Plan: Squinted hard; `grep array_keys | grep range`.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20215
This commit is contained in:
epriestley 2019-02-25 20:02:10 -08:00
parent 814e6d2de9
commit b28b05342b

View file

@ -43,7 +43,7 @@ final class PhabricatorSetConfigType
}
if ($value) {
if (array_keys($value) !== range(0, count($value) - 1)) {
if (!phutil_is_natural_list($value)) {
throw $this->newException(
pht(
'Option "%s" is of type "%s", and should be specified on the '.