1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-03 18:38:26 +01:00
phorge-arcanist/src/lint/engine/ArcanistUnitTestableLintEngine.php

33 lines
628 B
PHP
Raw Normal View History

2011-01-09 15:22:25 -08:00
<?php
/**
* Lint engine for use in constructing test cases. See
* @{class:ArcanistLinterTestCase}.
*/
final class ArcanistUnitTestableLintEngine extends ArcanistLintEngine {
2011-01-09 15:22:25 -08:00
protected $linters = array();
public function addLinter($linter) {
$this->linters[] = $linter;
return $this;
}
public function addFileData($path, $data) {
$this->fileData[$path] = $data;
return $this;
}
public function pathExists($path) {
if (idx($this->fileData, $path)) {
return true;
}
return parent::pathExists($path);
}
2011-01-09 15:22:25 -08:00
protected function buildLinters() {
return $this->linters;
}
}