Browse Source

Fix type errors

Jordi Boggiano 9 years ago
parent
commit
47b05eab7a

+ 5 - 0
src/Composer/Command/SelfUpdateCommand.php

@@ -172,6 +172,11 @@ EOT
         return 0;
     }
 
+    /**
+     * @param string $localFilename
+     * @param string $newFilename
+     * @param string $backupTarget
+     */
     protected function setLocalPhar($localFilename, $newFilename, $backupTarget = null)
     {
         try {

+ 1 - 1
src/Composer/Downloader/FilesystemException.php

@@ -19,7 +19,7 @@ namespace Composer\Downloader;
  */
 class FilesystemException extends \Exception
 {
-    public function __construct($message = null, $code = null, \Exception $previous = null)
+    public function __construct($message = '', $code = 0, \Exception $previous = null)
     {
         parent::__construct("Filesystem exception: \n".$message, $code, $previous);
     }

+ 7 - 7
src/Composer/IO/ConsoleIO.php

@@ -110,9 +110,9 @@ class ConsoleIO extends BaseIO
     }
 
     /**
-     * @param array $messages
-     * @param bool  $newline
-     * @param bool  $stderr
+     * @param array|string $messages
+     * @param bool         $newline
+     * @param bool         $stderr
      */
     private function doWrite($messages, $newline, $stderr)
     {
@@ -152,10 +152,10 @@ class ConsoleIO extends BaseIO
     }
 
     /**
-     * @param array $messages
-     * @param bool  $newline
-     * @param int   $size
-     * @param bool  $stderr
+     * @param array|string $messages
+     * @param bool         $newline
+     * @param int|null     $size
+     * @param bool         $stderr
      */
     private function doOverwrite($messages, $newline, $size, $stderr)
     {