From d4359a838add593ba9066697662375953f685c3b Mon Sep 17 00:00:00 2001 From: vrana Date: Fri, 11 Jan 2013 20:12:01 -0800 Subject: [PATCH] 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 --- src/lint/ArcanistLintMessage.php | 1 + 1 file changed, 1 insertion(+) 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; }