1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 18:22:41 +01:00

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
This commit is contained in:
vrana 2013-01-11 20:12:01 -08:00
parent e8decd2062
commit d4359a838a

View file

@ -142,6 +142,7 @@ final class ArcanistLintMessage {
* @param dict Keys 'path', 'line', 'char', 'original'. * @param dict Keys 'path', 'line', 'char', 'original'.
*/ */
public function setOtherLocations(array $locations) { public function setOtherLocations(array $locations) {
assert_instances_of($locations, 'array');
$this->otherLocations = $locations; $this->otherLocations = $locations;
return $this; return $this;
} }