Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/lint/linter/PhabricatorJavelinLinter.php
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | foreach ($uses as $symbol => $line) { | ||||
"boundaries. You may only access private members and methods ". | "boundaries. You may only access private members and methods ". | ||||
"from the file where they are defined."); | "from the file where they are defined."); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if ($this->getEngine()->getCommitHookMode()) { | |||||
// Don't do the dependency checks in commit-hook mode because we won't | |||||
// have an available working copy. | |||||
return; | |||||
} | |||||
$external_classes = array(); | $external_classes = array(); | ||||
foreach ($uses as $symbol => $line) { | foreach ($uses as $symbol => $line) { | ||||
$parts = explode('.', $symbol); | $parts = explode('.', $symbol); | ||||
$class = implode('.', array_slice($parts, 0, 2)); | $class = implode('.', array_slice($parts, 0, 2)); | ||||
if (!array_key_exists($class, $external_classes) && | if (!array_key_exists($class, $external_classes) && | ||||
!array_key_exists($class, $installs)) { | !array_key_exists($class, $installs)) { | ||||
$external_classes[$class] = $line; | $external_classes[$class] = $line; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |