Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14407508
D12956.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12956.diff
View Options
diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -957,13 +957,11 @@
private function lintImplicitFallthrough(XHPASTNode $root) {
$hook_obj = null;
- $working_copy = $this->getEngine()->getWorkingCopy();
- if ($working_copy) {
- $hook_class = $this->switchhook;
- if ($hook_class) {
- $hook_obj = newv($hook_class, array());
- assert_instances_of(array($hook_obj), 'ArcanistXHPASTLintSwitchHook');
- }
+
+ $hook_class = $this->switchhook;
+ if ($hook_class) {
+ $hook_obj = newv($hook_class, array());
+ assert_instances_of(array($hook_obj), 'ArcanistXHPASTLintSwitchHook');
}
$switches = $root->selectDescendantsOfType('n_SWITCH');
@@ -2253,20 +2251,15 @@
}
}
- $engine = $this->getEngine();
- $working_copy = $engine->getWorkingCopy();
-
- if ($working_copy) {
- // If a naming hook is configured, give it a chance to override the
- // default results for all the symbol names.
- $hook_class = $this->naminghook;
- if ($hook_class) {
- $hook_obj = newv($hook_class, array());
- foreach ($names as $k => $name_attrs) {
- list($type, $name, $token, $default) = $name_attrs;
- $result = $hook_obj->lintSymbolName($type, $name, $default);
- $names[$k][3] = $result;
- }
+ // If a naming hook is configured, give it a chance to override the
+ // default results for all the symbol names.
+ $hook_class = $this->naminghook;
+ if ($hook_class) {
+ $hook_obj = newv($hook_class, array());
+ foreach ($names as $k => $name_attrs) {
+ list($type, $name, $token, $default) = $name_attrs;
+ $result = $hook_obj->lintSymbolName($type, $name, $default);
+ $names[$k][3] = $result;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 3:03 AM (8 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6924627
Default Alt Text
D12956.diff (1 KB)
Attached To
Mode
D12956: Remove "commit hook mode" workarounds for ArcanistXHPASTLinter
Attached
Detach File
Event Timeline
Log In to Comment