]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use assert_instances_of(, 'array')
authorvrana <jakubv@fb.com>
Sat, 12 Jan 2013 04:12:01 +0000 (20:12 -0800)
committervrana <jakubv@fb.com>
Mon, 14 Jan 2013 19:36:29 +0000 (11:36 -0800)
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

index a0c71c09164f0112134ba298efd92845453da113..92e2c6b421a598e0462d6e30901d13d593bf2698 100644 (file)
@@ -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;
   }