From c95dcab439bc21ff1a0af8d9be3141cc69a9c27f Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 23 Jan 2013 13:12:23 -0800 Subject: [PATCH] Set hard-coded defaults for `list` values to array() Summary: These should default to array() so they're safe to `foreach` over. Test Plan: Grepped for 'list'. Reviewers: codeblock, btrahan, starruler, vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D4600 --- .../config/option/PhabricatorCoreConfigOptions.php | 2 +- .../option/PhabricatorExtendingPhabricatorConfigOptions.php | 4 ++-- .../config/PhabricatorDifferentialConfigOptions.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/applications/config/option/PhabricatorCoreConfigOptions.php b/src/applications/config/option/PhabricatorCoreConfigOptions.php index 941fed5ec9..c1dddac3d1 100644 --- a/src/applications/config/option/PhabricatorCoreConfigOptions.php +++ b/src/applications/config/option/PhabricatorCoreConfigOptions.php @@ -72,7 +72,7 @@ final class PhabricatorCoreConfigOptions "and a call to 'Leap Into Action'. If you'd prefer more ". "traditional UI strings like 'Submit', you can set this flag to ". "disable most of the jokes and easter eggs.")), - $this->newOption('environment.append-paths', 'list', null) + $this->newOption('environment.append-paths', 'list', array()) ->setSummary( pht("These paths get appended to your \$PATH envrionment variable.")) ->setDescription( diff --git a/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php b/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php index 3974a1f331..6f3cd66a7a 100644 --- a/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php +++ b/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php @@ -13,11 +13,11 @@ final class PhabricatorExtendingPhabricatorConfigOptions public function getOptions() { return array( - $this->newOption('load-libraries', 'list', null) + $this->newOption('load-libraries', 'list', array()) ->setLocked(true) ->setSummary(pht("Paths to additional phutil libraries to load.")) ->addExample('/srv/our-libs/sekrit-phutil', pht('Valid Setting')), - $this->newOption('events.listeners', 'list', null) + $this->newOption('events.listeners', 'list', array()) ->setLocked(true) ->setSummary( pht("Listeners receive callbacks when interesting things occur.")) diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php index 3529181884..a483a20f75 100644 --- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php +++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php @@ -22,7 +22,7 @@ final class PhabricatorDifferentialConfigOptions $this->newOption( 'differential.custom-remarkup-rules', 'list', - null) + array()) ->setSummary(pht('Custom remarkup rules.')) ->setDescription( pht( @@ -31,7 +31,7 @@ final class PhabricatorDifferentialConfigOptions $this->newOption( 'differential.custom-remarkup-block-rules', 'list', - null) + array()) ->setSummary(pht('Custom remarkup block rules.')) ->setDescription( pht( @@ -146,7 +146,7 @@ final class PhabricatorDifferentialConfigOptions "revision. If this option is false, Differential defaults to the ". "best it can, something like 'George Washington' or ". "'gwashington'.")), - $this->newOption('differential.generated-paths', 'list', null) + $this->newOption('differential.generated-paths', 'list', array()) ->setSummary(pht("File regexps to treat as automatically generated.")) ->setDescription( pht(