Skip to content

Commit

Permalink
Remove type hints.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmstacey committed Jul 16, 2009
1 parent 3b5f020 commit 4f0f530
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
26 changes: 13 additions & 13 deletions includes/stream_wrapper_registry.inc
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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) {
Expand All @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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).
Expand All @@ -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) {
Expand Down
40 changes: 21 additions & 19 deletions includes/stream_wrappers.inc
Expand Up @@ -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();
Expand All @@ -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);

Expand All @@ -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);
Expand All @@ -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();
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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
*/
Expand All @@ -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) {
Expand Down

0 comments on commit 4f0f530

Please sign in to comment.