diff --git a/src/lint/message/ArcanistLintMessage.php b/src/lint/message/ArcanistLintMessage.php index 8fe9850e..7ee90a4b 100644 --- a/src/lint/message/ArcanistLintMessage.php +++ b/src/lint/message/ArcanistLintMessage.php @@ -188,6 +188,7 @@ final class ArcanistLintMessage { } public function setDependentMessages(array $messages) { + assert_instances_of($messages, 'ArcanistLintMessage'); $this->dependentMessages = $messages; return $this; } diff --git a/src/lint/message/__init__.php b/src/lint/message/__init__.php index f40b8bd6..bf640281 100644 --- a/src/lint/message/__init__.php +++ b/src/lint/message/__init__.php @@ -5,7 +5,10 @@ */ + phutil_require_module('arcanist', 'lint/severity'); +phutil_require_module('phutil', 'utils'); + phutil_require_source('ArcanistLintMessage.php'); diff --git a/src/parser/bundle/ArcanistBundle.php b/src/parser/bundle/ArcanistBundle.php index 76ccd786..609bc7fa 100644 --- a/src/parser/bundle/ArcanistBundle.php +++ b/src/parser/bundle/ArcanistBundle.php @@ -546,7 +546,7 @@ final class ArcanistBundle { } private function buildHunkChanges(array $hunks) { - + assert_instances_of($hunks, 'ArcanistDiffHunk'); $result = array(); foreach ($hunks as $hunk) { $small_hunks = $this->breakHunkIntoSmallHunks($hunk); diff --git a/src/parser/diff/ArcanistDiffParser.php b/src/parser/diff/ArcanistDiffParser.php index 08cafae6..f1614d68 100644 --- a/src/parser/diff/ArcanistDiffParser.php +++ b/src/parser/diff/ArcanistDiffParser.php @@ -58,6 +58,7 @@ final class ArcanistDiffParser { } public function setChanges(array $changes) { + assert_instances_of($changes, 'ArcanistDiffChange'); $this->changes = mpull($changes, null, 'getCurrentPath'); return $this; } diff --git a/src/workflow/liberate/ArcanistLiberateWorkflow.php b/src/workflow/liberate/ArcanistLiberateWorkflow.php index 03bf4601..81ddbc77 100644 --- a/src/workflow/liberate/ArcanistLiberateWorkflow.php +++ b/src/workflow/liberate/ArcanistLiberateWorkflow.php @@ -202,6 +202,7 @@ EOTEXT } private function liberateWritePatches(array $results) { + assert_instances_of($results, 'ArcanistLintResult'); $wrote = array(); foreach ($results as $result) {