From 4f0f5302cbfa139ef3e20bc23933c1c5b506b505 Mon Sep 17 00:00:00 2001 From: Jon Stacey Date: Thu, 16 Jul 2009 15:21:35 -0500 Subject: [PATCH] Remove type hints. --- includes/stream_wrapper_registry.inc | 26 +++++++++--------- includes/stream_wrappers.inc | 40 +++++++++++++++------------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/includes/stream_wrapper_registry.inc b/includes/stream_wrapper_registry.inc index 574b6690e5..cb4144a217 100644 --- a/includes/stream_wrapper_registry.inc +++ b/includes/stream_wrapper_registry.inc @@ -33,11 +33,11 @@ class DrupalStreamWrapperRegistry { /** * Registers a stream wrapper scheme. * - * @param string $scheme + * @param $scheme * URI scheme. - * @param string $class + * @param $class * Class name for the stream wrapper. - * @return bool + * @return * result of stream_wrapper_register() * @see http://php.net/manual/en/function.stream-wrapper-register.php */ @@ -49,9 +49,9 @@ class DrupalStreamWrapperRegistry { /** * Unregisters a stream wrapper. * - * @param string $scheme + * @param$scheme * URI scheme. - * @return bool + * @return * result of stream_wrapper_unregister() * @see http://php.net/manual/en/function.stream-wrapper-unregister.php */ @@ -72,9 +72,9 @@ class DrupalStreamWrapperRegistry { /** * Returns the stream wrapper class name for a given scheme. * - * @param string $scheme + * @param $scheme * Stream scheme. - * @return mixed + * @return * Return string if a scheme has a registered handler, or FALSE. */ public static function getClassName($scheme) { @@ -92,7 +92,7 @@ class DrupalStreamWrapperRegistry { * * @param $uri * A stream, referenced as scheme://target. - * @return mixed + * @return * A string containing the name of the scheme, or FALSE if none. * For example, the URI public://example.txt would return public. */ @@ -121,7 +121,7 @@ class DrupalStreamWrapperRegistry { * * @param $uri * A stream, referenced as scheme://target. - * @return mixed + * @return * Returns a string containing the name of a validated stream. * Returns false if the URI does not contain a scheme or the scheme * does not have a registered handler. @@ -149,7 +149,7 @@ class DrupalStreamWrapperRegistry { * * @param $uri * A stream, referenced as scheme://target - * @return mixed + * @return * A string containing the target (path), or FALSE if none. * For example, the URI public://sample/test.txt would return * sample/test.txt @@ -177,7 +177,7 @@ class DrupalStreamWrapperRegistry { * * @param $uri * A stream, referenced as scheme://target - * @return mixed + * @return * Returns a new stream wrapper object appropriate for the given URI. * For example, a URI of public://example.txt would return a new * private stream wrapper object (DrupalPrivateStreamWrapper). @@ -208,7 +208,7 @@ class DrupalStreamWrapperRegistry { * * @param $scheme * If the stream was 'public://target', 'public' would be the scheme. - * @return mixed + * @return * Returns a new stream wrapper object appropriate for the given $scheme. * For example, for the public scheme a stream wrapper object * (DrupalPublicStreamWrapper). @@ -227,7 +227,7 @@ class DrupalStreamWrapperRegistry { * - Replace ':///' with '://' * - Remove trailing slashes on target. * - * @param string &$uri + * @param &$uri * String reference containing the URI to normalize. */ public static function normalizeUri(&$uri) { diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index dd226e3fd6..5b29dfb790 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -71,8 +71,8 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { * realpath() will return an absolute path such as * /Users/foo/Sites/drupal/sites/default/files/foobar.txt. * - * @return string - * Returns cononcialized absolute pathname for internal purposes. + * @return + * Returns a string containing the canonical, absolute path. * @see realpath() */ public function getInternalUri(); @@ -84,19 +84,21 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { * and accessed from a browser. For example, the external URL of * youtube://xIpLd0WQKCY might be http://www.youtube.com/watch?v=xIpLd0WQKCY. * - * @return string + * @return + * Returns a string containing a web accessible URL for the resource. */ public function getExternalUrl(); /** * Returns the MIME type of the resource. * - * @param array $mapping + * @param $mapping * An optional map of extensions to their mimetypes, in the form: * - 'mimetypes': a list of mimetypes, keyed by an identifier, * - 'extensions': the mapping itself, an associative array in which * the key is the extension and the value is the mimetype identifier. - * @return string + * @return + * Returns a string containing the MIME type of the resource. */ public function getMimeType($mapping = NULL); @@ -107,8 +109,8 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { * stream wrapper interface. This is a custom implementation for * Drupal. * - * @param mixed $mode - * @return bool + * @param $mode + * @return * Returns TRUE on success or FALSE on failure. */ public function chmod($mode); @@ -121,9 +123,9 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { * individual wrappers may implement their own solutions. * The base class will always return FALSE. * - * @return mixed - * A string with absolute pathname on success (implemented - * by core wrappers), or FALSE on failure or the registered + * @return + * Returns a string with absolute pathname on success (implemented + * by core wrappers), or FALSE on failure or if the registered * wrapper does not provide an implementation. */ public function realpath(); @@ -247,8 +249,8 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface * A bit mask of STREAM_USE_PATH and STREAM_REPORT_ERRORS. * @param &$opened_path * A string containing the path actually opened. - * @return bool - * TRUE if file was opened successfully. + * @return + * Returns TRUE if file was opened successfully. * @see http://php.net/manual/en/streamwrapper.stream-open.php */ public function stream_open($uri, $mode, $options, &$opened_url) { @@ -266,9 +268,9 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface /** * Support for flock(). * - * @param int $operation - * @return bool - * Always returns TRUE. + * @param $operation + * @return + * Always returns TRUE at the present time. * @see http://php.net/manual/en/streamwrapper.stream-lock.php */ public function stream_lock($operation) { @@ -297,8 +299,8 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface * * @param $data * The string to be written. - * @return int - * The number of bytes written. + * @return + * The number of bytes written (integer). * @see http://php.net/manual/en/streamwrapper.stream-write.php */ public function stream_write($data) { @@ -308,7 +310,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface /** * Support for feof(). * - * @return bool + * @return * TRUE if end-of-file has been reached. * @see http://php.net/manual/en/streamwrapper.stream-eof.php */ @@ -324,7 +326,7 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface * @param $whence * SEEK_SET, SEEK_CUR, or SEEK_END. * @return - * TRUE on success + * TRUE on success. * @see http://php.net/manual/en/streamwrapper.stream-seek.php */ public function stream_seek($offset, $whence) {