From 0829a625338d82561fb774228c39a61ded5d27bd Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Sun, 20 Dec 2020 22:43:57 +0100 Subject: [PATCH] add more type fixes + fix phpdoc syntax --- aerospike/aerospike.php | 2 +- date/date_c.php | 1 - gd/gd.php | 1 - gmp/gmp.php | 1 - grpc/grpc.php | 8 ++++---- ldap/ldap.php | 1 - mbstring/mbstring.php | 1 - parallel/parallel/Channel.php | 1 + radius/radius.php | 6 +++--- sodium/sodium.php | 1 - sqlsrv/sqlsrv.php | 1 - standard/standard_7.php | 2 +- v8js/v8js.php | 2 +- xcache/xcache.php | 8 ++++---- xlswriter/xlswriter.php | 28 ++++++++++++++-------------- yar/yar.php | 2 +- 16 files changed, 30 insertions(+), 36 deletions(-) diff --git a/aerospike/aerospike.php b/aerospike/aerospike.php index 5f0ee0e3..998ae960 100644 --- a/aerospike/aerospike.php +++ b/aerospike/aerospike.php @@ -3661,7 +3661,7 @@ class Aerospike { public function setDeserializer ( callable $unserialize_cb ) {} - /** + /* * Options can be assigned values that modify default behavior * Used by the constructor, read, write, scan, query, apply, and info * operations. diff --git a/date/date_c.php b/date/date_c.php index 3362613d..5e09eb88 100644 --- a/date/date_c.php +++ b/date/date_c.php @@ -221,7 +221,6 @@ class DateTimeImmutable implements DateTimeInterface { * @return static * Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or FALSE on failure. */ - public function modify($modifier) { } /** diff --git a/gd/gd.php b/gd/gd.php index df43efc4..75d3fa2d 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -2965,7 +2965,6 @@ function imagepalettetotruecolor ($image) {} * @param int $mode [optional] One of IMG_NEAREST_NEIGHBOUR, IMG_BILINEAR_FIXED, IMG_BICUBIC, IMG_BICUBIC_FIXED or anything else (will use two pass). * @return resource|GdImage|false Return scaled image resource on success or FALSE on failure. */ - function imagescale ($image, $new_width, $new_height = -1, $mode = IMG_BILINEAR_FIXED) {} /** diff --git a/gmp/gmp.php b/gmp/gmp.php index 28c706b1..1c121da7 100644 --- a/gmp/gmp.php +++ b/gmp/gmp.php @@ -510,7 +510,6 @@ function gmp_sign ($a) {} * @see gmp_random_range() * @removed 8.0 */ - #[Deprecated(reason: "Use see gmp_random_bits() or see gmp_random_range() instead", since: "7.2")] #[Pure] function gmp_random ($limiter = 20) {} diff --git a/grpc/grpc.php b/grpc/grpc.php index 07db0e05..046f6a31 100644 --- a/grpc/grpc.php +++ b/grpc/grpc.php @@ -92,7 +92,7 @@ namespace Grpc */ const CALL_ERROR_PAYLOAD_TYPE_MISMATCH = 14; - /** + /* * Register write flags */ @@ -109,7 +109,7 @@ namespace Grpc */ const WRITE_NO_COMPRESS = 2; - /** + /* * Register status constants */ @@ -259,7 +259,7 @@ namespace Grpc */ const STATUS_DATA_LOSS = 15; - /** + /* * Register op type constants */ @@ -328,7 +328,7 @@ namespace Grpc */ const OP_RECV_CLOSE_ON_SERVER = 7; - /** + /* * Register connectivity state constants */ diff --git a/ldap/ldap.php b/ldap/ldap.php index 101228d5..a6ff3694 100644 --- a/ldap/ldap.php +++ b/ldap/ldap.php @@ -1193,7 +1193,6 @@ function ldap_control_paged_result_response ($ldap, $result, &$cookie = null, &$ * @return string * @since 5.6 */ - function ldap_escape (string $value, string $ignore = "", int $flags = 0): string {} diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index b8bb3bc5..3a1cc4d5 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -1438,7 +1438,6 @@ function mb_scrub (string $string, ?string $encoding): bool|string * @param $position * @see mb_ereg_search_setpos */ - #[Deprecated(replacement: "mb_ereg_search_setpos(%parametersList%)", since: "7.3")] #[Pure] function mbereg_search_setpos ($position) {} diff --git a/parallel/parallel/Channel.php b/parallel/parallel/Channel.php index dd709899..c0362cad 100644 --- a/parallel/parallel/Channel.php +++ b/parallel/parallel/Channel.php @@ -92,6 +92,7 @@ final class Channel{ * @throws Channel\Error\Closed if channel is closed. */ public function recv(){} + /* Closing */ /** diff --git a/radius/radius.php b/radius/radius.php index 0d1292b7..438d0ba8 100644 --- a/radius/radius.php +++ b/radius/radius.php @@ -6,7 +6,7 @@ /** The maximum length of MPPE keys. */ define('RADIUS_MPPE_KEY_LEN', 16); -/** +/* * RADIUS Options * @link https://secure.php.net/manual/en/radius.constants.options.php */ @@ -16,7 +16,7 @@ define('RAD_OPTION_TAG', 1); /** When set, this option will result in the attribute value being tagged with the value of the tag parameter. */ define('RADIUS_OPTION_SALT', 2); -/** +/* * RADIUS Packet Types * @link https://secure.php.net/manual/en/radius.constants.packets.php */ @@ -75,7 +75,7 @@ define('RADIUS_COA_ACK', 44); */ define('RADIUS_COA_NAK', 45); -/** +/* * RADIUS Attribute Types * @link https://secure.php.net/manual/en/radius.constants.attributes.php */ diff --git a/sodium/sodium.php b/sodium/sodium.php index a60b4bef..d25839bf 100644 --- a/sodium/sodium.php +++ b/sodium/sodium.php @@ -239,7 +239,6 @@ function sodium_crypto_kx_keypair (): string {} * @throws SodiumException * @since 7.2 */ - function sodium_crypto_kx_publickey (string $key_pair): string {} /** diff --git a/sqlsrv/sqlsrv.php b/sqlsrv/sqlsrv.php index 9709559c..97520ffe 100644 --- a/sqlsrv/sqlsrv.php +++ b/sqlsrv/sqlsrv.php @@ -1731,7 +1731,6 @@ function SQLSRV_SQLTYPE_VARBINARY($byteCount){} * * @return int Value to use in any place that accepts a SQLSRV_SQLTYPE_* constant to represent the varchar data type. */ - function SQLSRV_SQLTYPE_VARCHAR($charCount) {} /** diff --git a/standard/standard_7.php b/standard/standard_7.php index 3a25a192..94ae6488 100644 --- a/standard/standard_7.php +++ b/standard/standard_7.php @@ -221,7 +221,6 @@ function unpack (string $format, string $string, int $offset = 0): array|false function get_browser (?string $user_agent, bool $return_array): object|array|false {} -#[PhpStormStubsElementAvailable(to: '7.4')] /** * One-way string encryption (hashing) * @link https://php.net/manual/en/function.crypt.php @@ -241,6 +240,7 @@ function get_browser (?string $user_agent, bool $return_array): object|array|fal * @return string|null the encrypted string or NULL if an error occurs */ #[Pure] +#[PhpStormStubsElementAvailable(to: '7.4')] function crypt ($string, $salt = null): ?string {} diff --git a/v8js/v8js.php b/v8js/v8js.php index 410f250c..a23da247 100644 --- a/v8js/v8js.php +++ b/v8js/v8js.php @@ -114,7 +114,7 @@ class V8Js public function clearPendingException() {} - /** Static methods **/ + /* Static methods */ /** * Registers persistent context independent global Javascript extension. diff --git a/xcache/xcache.php b/xcache/xcache.php index 22700b1b..9b6a5924 100644 --- a/xcache/xcache.php +++ b/xcache/xcache.php @@ -1,5 +1,5 @@