Skip to content

Commit

Permalink
add / fix some phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Aug 15, 2020
1 parent 3d884cd commit 77c26a5
Show file tree
Hide file tree
Showing 27 changed files with 170 additions and 162 deletions.
4 changes: 3 additions & 1 deletion Core/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ function trigger_error ($error_msg, $error_type = E_USER_NOTICE) {}
* @link https://php.net/manual/en/function.user-error.php
* @param string $message
* @param int $error_type [optional]
* @return bool This function returns false if wrong <i>error_type</i> is
* specified, true otherwise.
*/
function user_error ($message, $error_type = E_USER_NOTICE) {}

Expand Down Expand Up @@ -714,7 +716,7 @@ function get_defined_vars () {}
* @param string $code <p>
* The function code.
* </p>
* @return string a unique function name as a string, or false on error.
* @return string|false a unique function name as a string, or false on error.
* @deprecated 7.2 Use anonymous functions instead.
* @removed 8.0
*/
Expand Down
2 changes: 1 addition & 1 deletion Parle/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function pop() : void {}
* Push an item into the stack
*
* @link https://php.net/manual/en/parle-stack.push.php
* @param $item mixed Variable to be pushed.
* @param mixed $item Variable to be pushed.
* @return void
*/
public function push($item) {}
Expand Down
2 changes: 1 addition & 1 deletion SPL/SPL_c1.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public function fread ($length) {}
* @param string $escape [optional] <p>
* The escape character (one character only). Defaults as a backslash (\) or the value set using <b>SplFileObject::setCsvControl</b>.
* </p>
* @return array an indexed array containing the fields read, or false on error.
* @return array|false an indexed array containing the fields read, or false on error.
* </p>
* <p>
* A blank line in a CSV file will be returned as an array
Expand Down
24 changes: 12 additions & 12 deletions ZendCache/ZendCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
/**
* Stores a serializable variable into Shared Memory Cache
*
* @param $key string the data's key. Possibly prefixed with namespace
* @param $value mixed can be any PHP object that can be serialized.
* @param $ttl int [optional] time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
* @param string $key the data's key. Possibly prefixed with namespace
* @param mixed $value can be any PHP object that can be serialized.
* @param int $ttl [optional] time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
*
* @return bool FALSE when stored failed, TRUE otherwise
*/
Expand All @@ -17,7 +17,7 @@ function zend_shm_cache_store($key, $value, $ttl = 0) {}
* Retrieves data stored in the Shared Memory Cache.
* If the key is not found, returns null.
*
* @param $key string the data's key. Possibly prefixed with namespace
* @param string $key the data's key. Possibly prefixed with namespace
*
* @return null|mixed NULL when no data matching the key is found, else it returns the stored data
*/
Expand All @@ -26,7 +26,7 @@ function zend_shm_cache_fetch($key) {}
/**
* Delete a key from the Shared Memory cache
*
* @param $key string the data's key. Possibly prefixed with namespace
* @param string $key the data's key. Possibly prefixed with namespace
*
* @return null|mixed when no data matching the key is found, else it returns the stored data
*/
Expand All @@ -35,7 +35,7 @@ function zend_shm_cache_delete($key) {}
/**
* Clear the entire Shared Memory cache or just the provided namespace.
*
* @param $namespace string [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
* @param string $namespace [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
*
* @return bool TRUE on success, FALSE otherwise
*/
Expand All @@ -44,9 +44,9 @@ function zend_shm_cache_clear($namespace = '') {}
/**
* Stores a serializable variable into Disk Cache
*
* @param $key string the data's key. Possibly prefixed with namespace
* @param $value mixed can be any PHP object that can be serialized
* @param $ttl [optional] int time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
* @param string $key the data's key. Possibly prefixed with namespace
* @param mixed $value can be any PHP object that can be serialized
* @param int $ttl [optional] time to live in seconds. ZendCache keeps the objects in the cache as long as the TTL is no expired, once expired it will be removed from the cache
*
* @return bool FALSE when stored failed, TRUE otherwise
*/
Expand All @@ -55,7 +55,7 @@ function zend_disk_cache_store($key, $value, $ttl = 0) {}
/**
* Retrieves data stored in the Shared Memory Cache
*
* @param $key string NULL when no data matching the key is found, else it returns the stored data
* @param string $key the data's key. Possibly prefixed with namespace
*
* @return null|mixed NULL when no data matching the key is found, else it returns the stored data
*/
Expand All @@ -64,7 +64,7 @@ function zend_disk_cache_fetch($key) {}
/**
* Delete a key from the cache
*
* @param $key string the data's key. Possibly prefixed with namespace
* @param string $key the data's key. Possibly prefixed with namespace
*
* @return null|mixed when no data matching the key is found, else it returns the stored data
*/
Expand All @@ -73,7 +73,7 @@ function zend_disk_cache_delete($key) {}
/**
* Clear the entire Disk Memory cache or just the provided namespace.
*
* @param $namespace string [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
* @param string $namespace [optional] Namespace to clear. If blank or is not passed, it will clear entire cache.
*
* @return bool TRUE on success, FALSE otherwise
*/
Expand Down
2 changes: 1 addition & 1 deletion apcu/apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function next(){}
/**
* Gets the total number of cache hits
* @link https://php.net/manual/en/apciterator.gettotalhits.php
* @return int|bool The number of hits on success, or FALSE on failure.
* @return int|false The number of hits on success, or FALSE on failure.
*/
public function getTotalHits(){}

Expand Down
2 changes: 1 addition & 1 deletion ds/ds.php
Original file line number Diff line number Diff line change
Expand Up @@ -2202,7 +2202,7 @@ public function merge($values): Set
* it's the first iteration.
* $value The value of the current iteration.
*
* @param null $initial The initial value of the carry value. Can be
* @param mixed|null $initial The initial value of the carry value. Can be
* NULL.
*
* @return mixed The return value of the final callback.
Expand Down
3 changes: 2 additions & 1 deletion ftp/ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ function ftp_nb_fput ($ftp_stream, $remote_file, $handle, $mode = FTP_BINARY, $s
/**
* Alias of <b>ftp_close</b>
* @link https://php.net/manual/en/function.ftp-quit.php
* @param $ftp
* @param resource $ftp
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function ftp_quit ($ftp) {}

Expand Down
4 changes: 2 additions & 2 deletions gd/gd.php
Original file line number Diff line number Diff line change
Expand Up @@ -2047,10 +2047,10 @@ function imagelayereffect ($image, $effect) {}
/**
* Makes the colors of the palette version of an image more closely match the true color version
* @link https://php.net/manual/en/function.imagecolormatch.php
* @param $image1 resource <p>
* @param resource $image1 <p>
* A truecolor image link resource.
* </p>
* @param $image2 resource <p>
* @param resource $image2 <p>
* A palette image link resource pointing to an image that has the same
* size as image1.
* </p>
Expand Down
18 changes: 9 additions & 9 deletions memcache/memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ public function get ($key, &$flags = null) {}
* (PECL memcache &gt;= 0.2.0)<br/>
* Delete item from the server
* https://secure.php.net/manual/ru/memcache.delete.php
* @param $key string The key associated with the item to delete.
* @param $timeout int [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
* @param string $key The key associated with the item to delete.
* @param int $timeout [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
* @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function delete ($key, $timeout = 0 ) {}
Expand Down Expand Up @@ -294,8 +294,8 @@ public function setCompressThreshold ($thresold, $min_saving = 0.2) {}
* (PECL memcache &gt;= 0.2.0)<br/>
* Increment item's value
* @link https://php.net/manual/en/memcache.increment.php
* @param $key string Key of the item to increment.
* @param $value int [optional] increment the item by <b>value</b>
* @param string $key Key of the item to increment.
* @param int $value [optional] increment the item by <b>value</b>
* @return int|false Returns new items value on success or <b>FALSE</b> on failure.
*/
public function increment ($key, $value = 1) {}
Expand All @@ -304,8 +304,8 @@ public function increment ($key, $value = 1) {}
* (PECL memcache &gt;= 0.2.0)<br/>
* Decrement item's value
* @link https://php.net/manual/en/memcache.decrement.php
* @param $key string Key of the item do decrement.
* @param $value int Decrement the item by <b>value</b>.
* @param string $key Key of the item do decrement.
* @param int $value Decrement the item by <b>value</b>.
* @return int|false Returns item's new value on success or <b>FALSE</b> on failure.
*/
public function decrement ($key, $value = 1) {}
Expand Down Expand Up @@ -389,9 +389,9 @@ function memcache_connect ($host, $port, $timeout = 1) {}
* Memcache::pconnect — Open memcached server persistent connection
*
* @link https://php.net/manual/en/memcache.pconnect.php#example-5242
* @param $host
* @param null $port
* @param int $timeout
* @param string $host
* @param int|null $port
* @param int $timeout
* @return Memcache
*/
function memcache_pconnect ($host, $port=null, $timeout=1) {}
Expand Down
12 changes: 6 additions & 6 deletions ming/ming.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function getnumframes () {}
/**
* Set cubic threshold
* @link https://php.net/manual/en/function.ming-setcubicthreshold.php
* @param $threshold int <p>
* @param int $threshold <p>
* The Threshold. Lower is more accurate, hence larger file size.
* </p>
* @return void
Expand All @@ -369,7 +369,7 @@ function ming_setcubicthreshold ($threshold) {}
/**
* Set the global scaling factor.
* @link https://php.net/manual/en/function.ming-setscale.php
* @param $scale int <p>
* @param int $scale <p>
* The scale to be set.
* </p>
* @return void
Expand All @@ -379,7 +379,7 @@ function ming_setscale ($scale) {}
/**
* Sets the SWF version
* @link https://php.net/manual/en/function.ming-useswfversion.php
* @param $version int <p>
* @param int $version <p>
* SWF version to use.
* </p>
* @return void
Expand All @@ -389,7 +389,7 @@ function ming_useswfversion ($version) {}
/**
* Returns the action flag for keyPress(char)
* @link https://php.net/manual/en/function.ming-keypress.php
* @param $char string
* @param string $char
* @return int What the function returns, first on success, then on failure. See
* also the &amp;return.success; entity
*/
Expand All @@ -398,7 +398,7 @@ function ming_keypress ($char) {}
/**
* Use constant pool
* @link https://php.net/manual/en/function.ming-useconstants.php
* @param $use int <p>
* @param int $use <p>
* Its description
* </p>
* @return void
Expand All @@ -408,7 +408,7 @@ function ming_useconstants ($use) {}
/**
* Sets the SWF output compression
* @link https://php.net/manual/en/function.ming-setswfcompression.php
* @param $level int <p>
* @param int $level <p>
* The new compression level. Should be a value between 1 and 9
* inclusive.
* </p>
Expand Down
2 changes: 1 addition & 1 deletion mongo/mongo.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function setSlaveOkay ($ok) {}
*(PECL mongo &gt;= 1.2.0)<br/>
* Set the size for future connection pools.
* @link https://php.net/manual/en/mongo.setpoolsize.php
* @param $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p>
* @param int $size <p>The max number of connections future pools will be able to create. Negative numbers mean that the pool will spawn an infinite number of connections.</p>
* @return bool Returns the former value of pool size.
*/
public function setPoolSize($size) {}
Expand Down
2 changes: 1 addition & 1 deletion mssql/mssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function mssql_select_db ($database_name, $link_identifier = null) {}
* @param int $batch_size [optional] <p>
* The number of records to batch in the buffer.
* </p>
* @return mixed a MS SQL result resource on success, true if no rows were
* @return resource|bool a MS SQL result resource on success, true if no rows were
* returned, or false on error.
* @removed 7.0
*/
Expand Down
6 changes: 5 additions & 1 deletion pcntl/pcntl.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ function pcntl_wexitstatus ($status) {}

/**
* @param int $status
* @return bool
*/
function pcntl_wifcontinued ( $status){}
/**
Expand Down Expand Up @@ -289,8 +290,9 @@ function pcntl_alarm ($seconds) {}
function pcntl_get_last_error () {}

/**
* Alias of <b>pcntl_strerror</b>
* Alias of <b>pcntl_get_last_error</b>
* @link https://php.net/manual/en/function.pcntl-errno.php
* @return int error code.
* @since 5.3.4
*/
function pcntl_errno () {}
Expand Down Expand Up @@ -457,6 +459,8 @@ function pcntl_async_signals($on = null) {}
function pcntl_signal_get_handler($signo) {}

/**
* @param int $flags
* @return bool
* @since 7.4
*/
function pcntl_unshare($flags){}
Expand Down
2 changes: 1 addition & 1 deletion rar/rar.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ final class RarEntry
* @param bool $extended_data If TRUE, extended information such as NTFS ACLs and Unix owner information will be
* set in the extract files, as long as it's present in the archive.
*
* @return TRUE on success or FALSE on failure
* @return bool TRUE on success or FALSE on failure
*/
public function extract($dir, $filepath = "", $password = null, $extended_data = false)
{
Expand Down
1 change: 1 addition & 0 deletions session/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function session_regenerate_id ($delete_old_session = false) {}
* PHP > 5.4.0 <br/>
* Session shutdown function
* @link https://secure.php.net/manual/en/function.session-register-shutdown.php
* @return void
*/
function session_register_shutdown () {}

Expand Down
Loading

0 comments on commit 77c26a5

Please sign in to comment.