From: vrana Date: Sat, 12 Jan 2013 04:12:01 +0000 (-0800) Subject: Use assert_instances_of(, 'array') X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=d4359a838add593ba9066697662375953f685c3b;p=arcanist.git Use assert_instances_of(, 'array') Summary: To have at least one real callsite. Test Plan: $message = new ArcanistLintMessage(); $message->setOtherLocations(array()); $message->setOtherLocations(array(array())); $message->setOtherLocations(array(1)); Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4419 --- diff --git a/src/lint/ArcanistLintMessage.php b/src/lint/ArcanistLintMessage.php index a0c71c09..92e2c6b4 100644 --- a/src/lint/ArcanistLintMessage.php +++ b/src/lint/ArcanistLintMessage.php @@ -142,6 +142,7 @@ final class ArcanistLintMessage { * @param dict Keys 'path', 'line', 'char', 'original'. */ public function setOtherLocations(array $locations) { + assert_instances_of($locations, 'array'); $this->otherLocations = $locations; return $this; }