Changeset View
Changeset View
Standalone View
Standalone View
src/lint/ArcanistLintResult.php
| <?php | <?php | ||||
| /** | /** | ||||
| * A group of @{class:ArcanistLintMessage}s that apply to a file. | * A group of @{class:ArcanistLintMessage}s that apply to a file. | ||||
| * | |||||
| * @group lint | |||||
| */ | */ | ||||
| final class ArcanistLintResult { | final class ArcanistLintResult { | ||||
| protected $path; | protected $path; | ||||
| protected $data; | protected $data; | ||||
| protected $filePathOnDisk; | protected $filePathOnDisk; | ||||
| protected $cacheVersion; | protected $cacheVersion; | ||||
| protected $messages = array(); | protected $messages = array(); | ||||
| ▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | public function sortAndFilterMessages() { | ||||
| foreach ($messages as $key => $message) { | foreach ($messages as $key => $message) { | ||||
| $map[$key] = ($message->getLine() * (2 << 12)) + $message->getChar(); | $map[$key] = ($message->getLine() * (2 << 12)) + $message->getChar(); | ||||
| } | } | ||||
| asort($map); | asort($map); | ||||
| $messages = array_select_keys($messages, array_keys($map)); | $messages = array_select_keys($messages, array_keys($map)); | ||||
| $this->effectiveMessages = $messages; | $this->effectiveMessages = $messages; | ||||
| $this->needsSort = false; | $this->needsSort = false; | ||||
| } | } | ||||
| } | } | ||||