From: vrana Date: Mon, 11 Jun 2012 22:11:53 +0000 (-0700) Subject: Fix lint errors found by Nemo X-Git-Tag: conduit-6~260 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7650efc72d95061b4eedbf560e2d559090b75799;p=arcanist.git Fix lint errors found by Nemo 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 --- diff --git a/scripts/phutil_rebuild_map.php b/scripts/phutil_rebuild_map.php index 865f30dc..53d5ee1a 100755 --- a/scripts/phutil_rebuild_map.php +++ b/scripts/phutil_rebuild_map.php @@ -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); diff --git a/src/hgdaemon/ArcanistHgProxyServer.php b/src/hgdaemon/ArcanistHgProxyServer.php index 3ff9ae2e..43e0127f 100644 --- a/src/hgdaemon/ArcanistHgProxyServer.php +++ b/src/hgdaemon/ArcanistHgProxyServer.php @@ -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; diff --git a/src/parser/ArcanistBundle.php b/src/parser/ArcanistBundle.php index dec839c4..2eb3d9d9 100644 --- a/src/parser/ArcanistBundle.php +++ b/src/parser/ArcanistBundle.php @@ -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) { diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index 2ccbed0b..21a5ffc7 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -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) { diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index 30e7b1b1..771dfb22 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -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(