]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix lint errors found by Nemo
authorvrana <jakubv@fb.com>
Mon, 11 Jun 2012 22:11:53 +0000 (15:11 -0700)
committervrana <jakubv@fb.com>
Mon, 11 Jun 2012 23:27:53 +0000 (16:27 -0700)
Test Plan: Ran a script analyzing sources by HPHP.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D2710

scripts/phutil_rebuild_map.php
src/hgdaemon/ArcanistHgProxyServer.php
src/parser/ArcanistBundle.php
src/repository/api/ArcanistGitAPI.php
src/workflow/ArcanistPatchWorkflow.php

index 865f30dceffed277031d107e3e29e537dfb614f4..53d5ee1a73a25afeb2180c12c89e41c4ac03a7bb 100755 (executable)
@@ -266,7 +266,7 @@ final class PhutilLibraryMapBuilder {
       }
     } else {
       $this->log("Building library map...\n");
-      $library_map = $this->buildLibraryMap($symbol_map, $source_map);
+      $library_map = $this->buildLibraryMap($symbol_map);
 
       $this->log("Writing map...\n");
       $this->writeLibraryMap($library_map);
index 3ff9ae2e060122e0ab26ef29c54d323b643ec80a..43e0127fe8bc63b1c558fb112e36e6ef4147e4a5 100644 (file)
@@ -293,7 +293,7 @@ final class ArcanistHgProxyServer {
    */
   public function __destruct() {
     if ($this->socket) {
-      @stream_socket_shutdown($this->socket);
+      @stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
       @fclose($this->socket);
       Filesystem::remove(self::getPathToSocket($this->workingCopy));
       $this->socket = null;
index dec839c457ba3ec893659245e290b663b2acf710..2eb3d9d92cd8f1d6a03cd4edc294a6da965cf57d 100644 (file)
@@ -613,8 +613,8 @@ final class ArcanistBundle {
   }
 
   private function buildBinaryChange(ArcanistDiffChange $change) {
-    $old_phid = $change->getMetadata('old:binary-phid', null);
-    $new_phid = $change->getMetadata('new:binary-phid', null);
+    $old_phid = $change->getMetadata('old:binary-phid');
+    $new_phid = $change->getMetadata('new:binary-phid');
 
     $type = $change->getType();
     if ($type == ArcanistDiffChangeType::TYPE_ADD) {
index 2ccbed0b568ee66e0ef54f42de6640c747c06e66..21a5ffc7a3c16e16de0be995283fe55c177c76b2 100644 (file)
@@ -236,7 +236,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
 
       if (trim($object_type) !== 'commit') {
         throw new Exception(
-          "Relative commit '{$relative}' is not the name of a commit!");
+          "Relative commit '{$default_relative}' is not the name of a commit!");
       }
 
       if ($do_write) {
index 30e7b1b169f486ad62e9add5353deffc2ae504b9..771dfb22230afba382465c05631f53f43b762369 100644 (file)
@@ -502,7 +502,7 @@ EOTEXT
         $link_path = $symlink->getCurrentPath();
         switch ($symlink->getType()) {
           case ArcanistDiffChangeType::TYPE_ADD:
-          case ArcanistDiffChangeType::TYPE_MODIFY:
+          case ArcanistDiffChangeType::TYPE_CHANGE:
           case ArcanistDiffChangeType::TYPE_MOVE_HERE:
           case ArcanistDiffChangeType::TYPE_COPY_HERE:
             execx(