]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Simplify code by not passing local data to methods
authorvrana <jakubv@fb.com>
Wed, 12 Dec 2012 22:21:06 +0000 (14:21 -0800)
committervrana <jakubv@fb.com>
Wed, 12 Dec 2012 22:21:06 +0000 (14:21 -0800)
src/workflow/ArcanistBranchWorkflow.php

index dbdf9a853694d9b963ffdc5f4551c425270d4370..da389e40e3cdc502851d13d8ecf9bc41676e75b0 100644 (file)
@@ -71,7 +71,7 @@ EOTEXT
       throw new ArcanistUsageException('No branches in this working copy.');
     }
 
-    $branches = $this->loadCommitInfo($branches, $repository_api);
+    $branches = $this->loadCommitInfo($branches);
 
     $revisions = $this->loadRevisions($branches);
 
@@ -80,9 +80,8 @@ EOTEXT
     return 0;
   }
 
-  private function loadCommitInfo(
-    array $branches,
-    ArcanistRepositoryAPI $repository_api) {
+  private function loadCommitInfo(array $branches) {
+    $repository_api = $this->getRepositoryAPI();
 
     $futures = array();
     foreach ($branches as $branch) {