summaryrefslogtreecommitdiff
path: root/includes/filetransfer
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-04 16:31:04 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-04 16:31:04 +0000
commit1b01b241aeec9fd7688a8263cbb00a972e894652 (patch)
tree8cc6ece5b812a42d2d939aea0f887b4302d8a9ca /includes/filetransfer
parent99128df8d030061a94e093a0a6da91e11f8453cd (diff)
downloadbrdo-1b01b241aeec9fd7688a8263cbb00a972e894652.tar.gz
brdo-1b01b241aeec9fd7688a8263cbb00a972e894652.tar.bz2
- Patch #648744 by Crell: specified more @return type definitions for auto-completion in IDEs.
Diffstat (limited to 'includes/filetransfer')
-rw-r--r--includes/filetransfer/filetransfer.inc15
-rw-r--r--includes/filetransfer/ftp.inc8
2 files changed, 12 insertions, 11 deletions
diff --git a/includes/filetransfer/filetransfer.inc b/includes/filetransfer/filetransfer.inc
index f9182497b..cdd6e2cbf 100644
--- a/includes/filetransfer/filetransfer.inc
+++ b/includes/filetransfer/filetransfer.inc
@@ -27,10 +27,11 @@ abstract class FileTransfer {
abstract static function factory($jail, $settings);
/**
- * Implementation of the magic __get() method. If the connection isn't set to
- * anything, this will call the connect() method and set it to and return the
- * result; afterwards, the connection will be returned directly without using
- * this method.
+ * Implementation of the magic __get() method.
+ *
+ * If the connection isn't set to anything, this will call the connect() method
+ * and set it to and return the result; afterwards, the connection will be
+ * returned directly without using this method.
*/
function __get($name) {
if ($name == 'connection') {
@@ -80,7 +81,7 @@ abstract class FileTransfer {
$this->checkPath($path);
$this->chmodJailed($path, $mode, $recursive);
}
-
+
/**
* Creates a directory.
*
@@ -156,7 +157,7 @@ abstract class FileTransfer {
* @param $path
* @param $strip_chroot
*
- * @return string;
+ * @return string
*/
protected final function fixRemotePath($path, $strip_chroot = TRUE) {
$path = $this->sanitizePath($path);
@@ -173,7 +174,7 @@ abstract class FileTransfer {
* Changes backslahes to slashes, also removes a trailing slash.
*
* @param string $path
- * @return string;
+ * @return string
*/
function sanitizePath($path) {
$path = str_replace('\\', '/', $path); // Windows path sanitiation.
diff --git a/includes/filetransfer/ftp.inc b/includes/filetransfer/ftp.inc
index e4d83bcc9..d392e16cb 100644
--- a/includes/filetransfer/ftp.inc
+++ b/includes/filetransfer/ftp.inc
@@ -5,7 +5,7 @@
* Base class for FTP implementations.
*/
abstract class FileTransferFTP extends FileTransfer {
-
+
public function __construct($jail, $username, $password, $hostname, $port) {
$this->username = $username;
$this->password = $password;
@@ -19,7 +19,7 @@ abstract class FileTransferFTP extends FileTransfer {
*
* @param string $jail
* @param array $settings
- * @return
+ * @return FileTransferFTP
* The appropriate FileTransferFTP subclass based on the available
* options. If the FTP PHP extension is available, use it. Otherwise, we
* try to use the FTP file stream support.
@@ -27,7 +27,7 @@ abstract class FileTransferFTP extends FileTransfer {
static function factory($jail, $settings) {
$settings['hostname'] = empty($settings['hostname']) ? 'localhost' : $settings['hostname'];
$settings['port'] = empty($settings['port']) ? 21 : $settings['port'];
-
+
if (function_exists('ftp_connect')) {
$class = 'FileTransferFTPExtension';
}
@@ -46,7 +46,7 @@ abstract class FileTransferFTP extends FileTransfer {
* Connection class using the FTP URL wrapper.
*/
class FileTransferFTPWrapper extends FileTransferFTP {
-
+
function connect() {
$this->connection = 'ftp://' . urlencode($this->username) . ':' . urlencode($this->password) . '@' . $this->hostname . ':' . $this->port . '/';
if (!is_dir($this->connection)) {