Browse Source

* fix up CS suggestions from stof/seldaek

till 13 years ago
parent
commit
c6653f0711

+ 5 - 4
src/Composer/Downloader/SvnDownloader.php

@@ -18,16 +18,17 @@ use Composer\Util\Svn as SvnUtil;
 
 /**
  * @author Ben Bieker <mail@ben-bieker.de>
+ * @author Till Klampaeckel <till@php.net>
  */
 class SvnDownloader extends VcsDownloader
 {
     /**
-     * @var bool $useAuth
+     * @var bool
      */
     protected $useAuth = false;
 
     /**
-     * @var \Composer\Util\Svn $util
+     * @var \Composer\Util\Svn
      */
     protected $util;
 
@@ -99,7 +100,7 @@ class SvnDownloader extends VcsDownloader
         }
 
         // the error is not auth-related
-        if (strpos($output, 'authorization failed:') === false) {
+        if (false === strpos($output, 'authorization failed:')) {
             return $output;
         }
 
@@ -117,7 +118,7 @@ class SvnDownloader extends VcsDownloader
     }
 
     /**
-     * This is heavy - recreating Util often.
+     * This is potentially heavy - recreating Util often.
      *
      * @param string $url
      *

+ 8 - 13
src/Composer/Repository/Vcs/SvnDriver.php

@@ -9,6 +9,7 @@ use Composer\IO\IOInterface;
 
 /**
  * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @author Till Klampaeckel <till@php.net>
  */
 class SvnDriver extends VcsDriver
 {
@@ -18,41 +19,38 @@ class SvnDriver extends VcsDriver
     protected $infoCache = array();
 
     /**
-     * @var boolean $useAuth Contains credentials, or not?
+     * Contains credentials, or not?
+     * @var boolean
      */
     protected $useAuth = false;
 
     /**
-     * @var boolean $useCache To determine if we should cache the credentials
-     *                        supplied by the user. By default: no cache.
-     * @see self::getSvnAuthCache()
+     * To determine if we should cache the credentials supplied by the user. By default: no cache.
+     * @var boolean
      */
     protected $useCache = false;
 
     /**
-     * @var string $svnUsername
+     * @var string
      */
     protected $svnUsername = '';
 
     /**
-     * @var string $svnPassword
+     * @var string
      */
     protected $svnPassword = '';
 
     /**
-     * @var Composer\Util\Svn $util
+     * @var \Composer\Util\Svn
      */
     protected $util;
 
     /**
-     * __construct
-     *
      * @param string          $url
      * @param IOInterface     $io
      * @param ProcessExecutor $process
      *
      * @return $this
-     * @uses   self::detectSvnAuth()
      */
     public function __construct($url, IOInterface $io, ProcessExecutor $process = null)
     {
@@ -74,9 +72,6 @@ class SvnDriver extends VcsDriver
      * @param string $url     The SVN URL.
      *
      * @return string
-     * @uses   Composer\Util\Svn::getCommand()
-     * @uses   parent::$process
-     * @see    ProcessExecutor::execute()
      */
     public function execute($command, $url)
     {

+ 7 - 17
src/Composer/Util/Svn.php

@@ -19,34 +19,32 @@ use Composer\IO\IOInterface;
 class Svn
 {
     /**
-     * @var mixed $credentials
-     * @see self::hasAuth()
+     * @var mixed
      */
     protected $credentials;
 
     /**
-     * @var boolean $hasAuth
+     * @var bool
      */
     protected $hasAuth;
 
     /**
-     * @var \Composer\IO\IOInterface $io
+     * @var \Composer\IO\IOInterface
      */
     protected $io;
 
     /**
-     * @var string $url
+     * @var string
      */
     protected $url;
 
     /**
-     * @var bool $useCache Cache credentials.
+     * Cache credentials.
+     * @var bool
      */
     protected $useCache = false;
 
     /**
-     * __construct
-     *
      * @param string                   $url
      * @param \Composer\IO\IOInterface $io
      *
@@ -59,15 +57,9 @@ class Svn
     }
 
     /**
-     * doAuthDance
-     *
      * Repositories requests credentials, let's put them in.
      *
      * @return \Composer\Util\Svn
-     * @uses   self::$io
-     * @uses   self::$hasAuth
-     * @uses   self::$credentials
-     * @uses   self::$useCache
      */
     public function doAuthDance()
     {
@@ -80,7 +72,7 @@ class Svn
         $this->credentials->password = $this->io->askAndHideAnswer("Password: ");
 
         $pleaseCache = $this->io->askConfirmation("Should Subversion cache these credentials? (yes/no) ", false);
-        if ($pleaseCache === true) {
+        if ($pleaseCache) {
             $this->useCache = true;
         }
         return $this;
@@ -89,8 +81,6 @@ class Svn
      * Return the no-auth-cache switch.
      *
      * @return string
-     * @uses   selfg::$useCache
-     * @see    self::doAuthDance()
      */
     public function getAuthCache()
     {