From a8ea3b8db6414163dd63746b56a7a280f157906a Mon Sep 17 00:00:00 2001
From: "Maxim.Kolmakov"
Date: Mon, 8 Jun 2020 16:34:00 +0200
Subject: [PATCH] Fix undefined class inspection
---
Core/Core.php | 8 ++---
cassandra/cassandra.php | 6 ++--
event/event.php | 52 ++++++++++++++++-----------------
fann/fann.php | 2 +-
ffmpeg/ffmpeg.php | 2 +-
gd/gd.php | 2 +-
http/http.php | 24 +++++++--------
http/http3.php | 2 +-
mongo/mongo.php | 2 +-
mysql_xdevapi/mysql_xdevapi.php | 4 +--
ncurses/ncurses.php | 16 +++++-----
standard/standard_1.php | 4 +--
stomp/stomp.php | 2 +-
uopz/uopz.php | 2 +-
zend/zend.php | 10 +++----
15 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/Core/Core.php b/Core/Core.php
index 46590c35..9187a0ae 100755
--- a/Core/Core.php
+++ b/Core/Core.php
@@ -56,7 +56,7 @@ function strlen ($string) {}
* @param string $str2
* The second string.
*
- * @return int < 0 if str1 is less than
+ * @return int 0 if str1 is less than
* str2; > 0 if str1
* is greater than str2, and 0 if they are
* equal.
@@ -75,7 +75,7 @@ function strcmp ($str1, $str2) {}
* @param int $len
* Number of characters to use in the comparison.
*
- * @return int < 0 if str1 is less than
+ * @return int 0 if str1 is less than
* str2; > 0 if str1
* is greater than str2, and 0 if they are
* equal.
@@ -91,7 +91,7 @@ function strncmp ($str1, $str2, $len) {}
* @param string $str2
* The second string
*
- * @return int < 0 if str1 is less than
+ * @return int 0 if str1 is less than
* str2; > 0 if str1
* is greater than str2, and 0 if they are
* equal.
@@ -110,7 +110,7 @@ function strcasecmp ($str1, $str2) {}
* @param int $len
* The length of strings to be used in the comparison.
*
- * @return int < 0 if str1 is less than
+ * @return int 0 if str1 is less than
* str2; > 0 if str1 is
* greater than str2, and 0 if they are equal.
*/
diff --git a/cassandra/cassandra.php b/cassandra/cassandra.php
index a2ec2ffa..9a4fb103 100644
--- a/cassandra/cassandra.php
+++ b/cassandra/cassandra.php
@@ -4912,9 +4912,9 @@ namespace Cassandra {
{
/**
- * @param long|double|string|\Cassandra\Bigint $months Months attribute of the duration.
- * @param long|double|string|\Cassandra\Bigint $days Days attribute of the duration.
- * @param long|double|string|\Cassandra\Bigint $nanos Nanos attribute of the duration.
+ * @param int|double|string|\Cassandra\Bigint $months Months attribute of the duration.
+ * @param int|double|string|\Cassandra\Bigint $days Days attribute of the duration.
+ * @param int|double|string|\Cassandra\Bigint $nanos Nanos attribute of the duration.
*
* @link https://docs.datastax.com/en/developer/php-driver/latest/api/Cassandra/class.Duration/#method-__construct
*/
diff --git a/event/event.php b/event/event.php
index 8c6b0f9c..b4b4668d 100644
--- a/event/event.php
+++ b/event/event.php
@@ -36,7 +36,7 @@ final class Event
*
* @see https://php.net/manual/en/event.construct.php
*/
- public function __construct(EventBase $base, mixed $fd, int $what, callable $cb, mixed $arg = null)
+ public function __construct(EventBase $base, $fd, int $what, callable $cb, $arg = null)
{
}
@@ -50,7 +50,7 @@ final class Event
*
* @see https://php.net/manual/en/event.add.php
*/
- public function add(double $timeout = -1): bool
+ public function add(float $timeout = -1): bool
{
}
@@ -64,7 +64,7 @@ final class Event
*
* @see https://php.net/manual/en/event.addsignal.php
*/
- public function addSignal(double $timeout = -1): bool
+ public function addSignal(float $timeout = -1): bool
{
}
@@ -78,7 +78,7 @@ final class Event
*
* @see https://php.net/manual/en/event.addtimer.php
*/
- public function addTimer(double $timeout = -1): bool
+ public function addTimer(float $timeout = -1): bool
{
}
@@ -168,7 +168,7 @@ final class Event
*
* @see https://php.net/manual/en/event.set.php
*/
- public function set(EventBase $base, mixed $fd, int $what, callable $cb, mixed $arg): bool
+ public function set(EventBase $base, $fd, int $what, callable $cb, $arg): bool
{
}
@@ -196,7 +196,7 @@ final class Event
*
* @see https://php.net/manual/en/event.settimer.php
*/
- public function setTimer(EventBase $base, callable $cb, mixed $arg): bool
+ public function setTimer(EventBase $base, callable $cb, $arg): bool
{
}
@@ -213,7 +213,7 @@ final class Event
*
* @see https://php.net/manual/en/event.signal.php
*/
- public static function signal(EventBase $base, int $signum, callable $cb, mixed $arg): Event
+ public static function signal(EventBase $base, int $signum, callable $cb, $arg): Event
{
}
@@ -229,7 +229,7 @@ final class Event
*
* @see https://php.net/manual/en/event.timer.php
*/
- public static function timer(EventBase $base, callable $cb, mixed $arg): Event
+ public static function timer(EventBase $base, callable $cb, $arg): Event
{
}
}
@@ -287,7 +287,7 @@ final class EventBase
*
* @see https://php.net/manual/en/eventbase.exit.php
*/
- public function exit(double $timeout): bool
+ public function exit(float $timeout): bool
{
}
@@ -333,7 +333,7 @@ final class EventBase
*
* @see https://php.net/manual/en/eventbase.gettimeofdaycached.php
*/
- public function getTimeOfDayCached(): double
+ public function getTimeOfDayCached(): float
{
}
@@ -636,7 +636,7 @@ class EventBuffer
*
* @see https://php.net/manual/en/eventbuffer.readfrom.php
*/
- public function readFrom(mixed $fd, int $howmuch): int
+ public function readFrom($fd, int $howmuch): int
{
}
@@ -666,7 +666,7 @@ class EventBuffer
*
* @see https://php.net/manual/en/eventbuffer.search.php
*/
- public function search(string $what, int $start = 1, int $end = 1): mixed
+ public function search(string $what, int $start = 1, int $end = 1)
{
}
@@ -681,7 +681,7 @@ class EventBuffer
*
* @see https://php.net/manual/en/eventbuffer.searcheol.php
*/
- public function searchEol(int $start = 1, int $eol_style = EOL_ANY): mixed
+ public function searchEol(int $start = 1, int $eol_style = EOL_ANY)
{
}
@@ -737,7 +737,7 @@ class EventBuffer
*
* @see https://php.net/manual/en/eventbuffer.write.php
*/
- public function write(mixed $fd, int $howmuch): int
+ public function write($fd, int $howmuch): int
{
}
}
@@ -797,7 +797,7 @@ final class EventBufferEvent
*
* @see https://php.net/manual/en/eventbufferevent.construct.php
*/
- public function __construct(EventBase $base, mixed $socket = null, int $options = 0, callable $readcb = null, callable $writecb = null, callable $eventcb = null)
+ public function __construct(EventBase $base, $socket = null, int $options = 0, callable $readcb = null, callable $writecb = null, callable $eventcb = null)
{
}
@@ -1131,7 +1131,7 @@ final class EventBufferEvent
*
* @see https://secure.php.net/manual/en/eventbufferevent.sslsocket.php
*/
- public static function sslSocket(EventBase $base, mixed $socket, EventSslContext $ctx, int $state, int $options): EventBufferEvent
+ public static function sslSocket(EventBase $base, $socket, EventSslContext $ctx, int $state, int $options): EventBufferEvent
{
}
@@ -1406,7 +1406,7 @@ final class EventHttp
*
* @see https://secure.php.net/manual/en/eventhttp.accept.php
*/
- public function accept(mixed $socket): bool
+ public function accept($socket): bool
{
}
@@ -1605,7 +1605,7 @@ class EventHttpConnection
*
* @see https://secure.php.net/manual/en/eventhttpconnection.setclosecallback.php
*/
- public function setCloseCallback(callable $callback, mixed $data): void
+ public function setCloseCallback(callable $callback, $data): void
{
}
@@ -1822,7 +1822,7 @@ final class EventListener
*
* @see https://secure.php.net/manual/en/eventlistener.construct.php
*/
- public function __construct(EventBase $base, callable $cb, mixed $data, int $flags, int $backlog, mixed $target)
+ public function __construct(EventBase $base, callable $cb, $data, int $flags, int $backlog, $target)
{
}
@@ -1871,7 +1871,7 @@ final class EventListener
*
* @see https://secure.php.net/manual/en/eventlistener.getsocketname.php
*/
- public static function getSocketName(string &$address, mixed &$port): bool
+ public static function getSocketName(string &$address, &$port): bool
{
}
@@ -1884,7 +1884,7 @@ final class EventListener
*
* @see https://secure.php.net/manual/en/eventlistener.setcallback.php
*/
- public function setCallback(callable $cb, mixed $arg = null): void
+ public function setCallback(callable $cb, $arg = null): void
{
}
@@ -2006,7 +2006,7 @@ final class EventUtil
*
* @see https://secure.php.net/manual/en/eventutil.getlastsocketerrno.php
*/
- public static function getLastSocketErrno(mixed $socket = null): int
+ public static function getLastSocketErrno($socket = null): int
{
}
@@ -2020,7 +2020,7 @@ final class EventUtil
*
* @see https://secure.php.net/manual/en/eventutil.getlastsocketerror.php
*/
- public static function getLastSocketError(mixed $socket): string
+ public static function getLastSocketError($socket): string
{
}
@@ -2034,7 +2034,7 @@ final class EventUtil
*
* @see https://secure.php.net/manual/en/eventutil.getsocketfd.php
*/
- public static function getSocketFd(mixed $socket): int
+ public static function getSocketFd($socket): int
{
}
@@ -2050,7 +2050,7 @@ final class EventUtil
*
* @see https://secure.php.net/manual/en/eventutil.getsocketname.php
*/
- public static function getSocketName(mixed $socket, string &$address, mixed &$port): bool
+ public static function getSocketName($socket, string &$address, &$port): bool
{
}
@@ -2067,7 +2067,7 @@ final class EventUtil
*
* @see https://secure.php.net/manual/en/eventutil.setsocketoption.php
*/
- public static function setSocketOption(mixed $socket, int $level, int $optname, mixed $optval): bool
+ public static function setSocketOption($socket, int $level, int $optname, $optval): bool
{
}
diff --git a/fann/fann.php b/fann/fann.php
index 4462b54c..e039c694 100644
--- a/fann/fann.php
+++ b/fann/fann.php
@@ -1197,7 +1197,7 @@ function fann_set_bit_fail_limit($ann, $bit_fail_limit)
* Sets the callback function for use during training
*
* @param resource $ann
- * @param collable $callback
+ * @param callable $callback
*
* @return bool
*/
diff --git a/ffmpeg/ffmpeg.php b/ffmpeg/ffmpeg.php
index 5977ec5f..fb091622 100644
--- a/ffmpeg/ffmpeg.php
+++ b/ffmpeg/ffmpeg.php
@@ -178,7 +178,7 @@ class ffmpeg_frame
* NOTE: This function will not be available if GD is not enabled.
* @param resource $gd_image
*/
- public function __construct(resource $gd_image)
+ public function __construct($gd_image)
{
}
diff --git a/gd/gd.php b/gd/gd.php
index 2119a0ce..1a19f336 100644
--- a/gd/gd.php
+++ b/gd/gd.php
@@ -2208,7 +2208,7 @@ function imagecreatefromtga($filename) {}
*
* https://www.php.net/manual/en/function.imagegrabscreen.php
*
- * @return resorce|false
+ * @return resource|false
*/
function imagegrabscreen() {}
diff --git a/http/http.php b/http/http.php
index be40d766..c6caa7f1 100644
--- a/http/http.php
+++ b/http/http.php
@@ -255,7 +255,7 @@ class HttpMessage implements Countable, Serializable, Iterator {
*
* @return void
*/
- public function setHeaders (sarray $header) {}
+ public function setHeaders (array $header) {}
/**
* (PECL pecl_http >= 0.10.0)
@@ -927,7 +927,7 @@ class HttpRequest {
*
* @return bool true on success or false on failure.
*/
- public function addSslOptions (sarray $option) {}
+ public function addSslOptions (array $option) {}
/**
* (PECL pecl_http >= 0.10.0)
@@ -2332,7 +2332,7 @@ function http_match_etag ($etag, $for_range = null) {}
* @param int $timestamp_or_expires [optional]
* Unix timestamp
*
- * @return bool &returns.http.false.orexits; with 304 Not Modified if the entity is cached.
+ * @return bool with 304 Not Modified if the entity is cached.
* &see.http.configuration.force_exit;
*/
function http_cache_last_modified ($timestamp_or_expires = null) {}
@@ -2344,7 +2344,7 @@ function http_cache_last_modified ($timestamp_or_expires = null) {}
* @param string $etag [optional]
* custom ETag
*
- * @return bool &returns.http.false.orexits; with 304 Not Modified if the entity is cached.
+ * @return bool with 304 Not Modified if the entity is cached.
* &see.http.configuration.force_exit;
*/
function http_cache_etag ($etag = null) {}
@@ -2540,7 +2540,7 @@ function http_persistent_handles_ident ($ident) {}
* @param array $info [optional]
* Will be filled with request/response information
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_get ($url, array $options = null , array &$info = null ) {}
@@ -2557,7 +2557,7 @@ function http_get ($url, array $options = null , array &$info = null ) {}
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_head ($url = null, array $options = null , array &$info = null ) {}
@@ -2577,7 +2577,7 @@ function http_head ($url = null, array $options = null , array &$info = null )
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_post_data ($url, $data = null, array $options = null , array &$info = null ) {}
@@ -2600,7 +2600,7 @@ function http_post_data ($url, $data = null, array $options = null , array &$in
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_post_fields ($url, array $data = null , array $files = null , array $options = null , array &$info = null ) {}
@@ -2620,7 +2620,7 @@ function http_post_fields ($url, array $data = null , array $files = null , ar
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_put_data ($url, $data = null, array $options = null , array &$info = null ) {}
@@ -2640,7 +2640,7 @@ function http_put_data ($url, $data = null, array $options = null , array &$inf
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_put_file ($url, $file = null, array $options = null , array &$info = null ) {}
@@ -2660,7 +2660,7 @@ function http_put_file ($url, $file = null, array $options = null , array &$inf
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_put_stream ($url, $stream = null, array $options = null , array &$info = null ) {}
@@ -2683,7 +2683,7 @@ function http_put_stream ($url, $stream = null, array $options = null , array &
* @param array $info [optional]
* &link.http.request.info;
*
- * @return string &returns.http.response;
+ * @return string
*/
function http_request ($method, $url = null, $body = null, array $options = null , array &$info = null ) {}
diff --git a/http/http3.php b/http/http3.php
index 2127fee8..78db4163 100644
--- a/http/http3.php
+++ b/http/http3.php
@@ -1878,7 +1878,7 @@ class Url {
* @throws \http\Exception\BadUrlException
* @return \http\Url clone.
*/
- function mod($parts, int $flags = \http\Url::JOIN_PATH|http\Url::JOIN_QUERY|http\Url::SANITIZE_PATH) {}
+ function mod($parts, int $flags = \http\Url::JOIN_PATH|\http\Url::JOIN_QUERY|\http\Url::SANITIZE_PATH) {}
/**
* Retrieve the URL parts as array.
*
diff --git a/mongo/mongo.php b/mongo/mongo.php
index b4caaccf..eb37acab 100644
--- a/mongo/mongo.php
+++ b/mongo/mongo.php
@@ -1433,7 +1433,7 @@ class MongoCursor implements Iterator {
* @throws MongoCursorException
* @return MongoCursor Returns this cursor
*/
- public function hint(mixed $key_pattern) {}
+ public function hint($key_pattern) {}
/**
diff --git a/mysql_xdevapi/mysql_xdevapi.php b/mysql_xdevapi/mysql_xdevapi.php
index dcd6683f..92cb2793 100644
--- a/mysql_xdevapi/mysql_xdevapi.php
+++ b/mysql_xdevapi/mysql_xdevapi.php
@@ -1409,7 +1409,7 @@ class TableInsert implements \mysql_xdevapi\Executable {
* @link https://www.php.net/manual/en/class.mysql-xdevapi-tableselect.php
* @package mysql_xdevapi
*/
-class TableSelect implements mysql_xdevapi\Executable {
+class TableSelect implements \mysql_xdevapi\Executable {
/**
* Binds a value to a specific placeholder.
* @link https://www.php.net/manual/en/mysql-xdevapi-tableselect.bind.php
@@ -1431,7 +1431,7 @@ class TableSelect implements mysql_xdevapi\Executable {
* @param mixed $sort_expr
* @return \mysql_xdevapi\TableSelect
*/
- public function groupBy ( mixed $sort_expr ) : \mysql_xdevapi\TableSelect {}
+ public function groupBy ($sort_expr ) : \mysql_xdevapi\TableSelect {}
/**
* Sets a condition for records to consider in aggregate function operations.
diff --git a/ncurses/ncurses.php b/ncurses/ncurses.php
index 966b47b6..138a0b21 100644
--- a/ncurses/ncurses.php
+++ b/ncurses/ncurses.php
@@ -54,7 +54,7 @@ function ncurses_has_colors () {}
/**
* Initialize ncurses
* @link https://php.net/manual/en/function.ncurses-init.php
- * @return void &return.void;
+ * @return void
*
*/
function ncurses_init () {}
@@ -195,7 +195,7 @@ function ncurses_cbreak () {}
/**
* Clear screen
* @link https://php.net/manual/en/function.ncurses-clear.php
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_clear () {}
@@ -203,7 +203,7 @@ function ncurses_clear () {}
/**
* Clear screen from current position to bottom
* @link https://php.net/manual/en/function.ncurses-clrtobot.php
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_clrtobot () {}
@@ -211,7 +211,7 @@ function ncurses_clrtobot () {}
/**
* Clear screen from current position to end of line
* @link https://php.net/manual/en/function.ncurses-clrtoeol.php
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_clrtoeol () {}
@@ -265,7 +265,7 @@ function ncurses_deleteln () {}
/**
* Write all prepared refreshes to terminal
* @link https://php.net/manual/en/function.ncurses-doupdate.php
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_doupdate () {}
@@ -281,7 +281,7 @@ function ncurses_echo () {}
/**
* Erase terminal screen
* @link https://php.net/manual/en/function.ncurses-erase.php
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_erase () {}
@@ -676,7 +676,7 @@ function ncurses_slk_color ($intarg) {}
* arrangement and 2 indicates the PC like 4-4-4 mode, but in addition an
* index line will be created.
*
- * @return bool &return.success;
+ * @return bool
*
*/
function ncurses_slk_init ($format) {}
@@ -1498,7 +1498,7 @@ function ncurses_getyx ($window, &$y, &$x) {}
* @param $x int
* This will be set to the window width
*
- * @return void &return.void;
+ * @return void
*
*/
function ncurses_getmaxyx ($window, &$y, &$x) {}
diff --git a/standard/standard_1.php b/standard/standard_1.php
index d359175a..57d5a361 100644
--- a/standard/standard_1.php
+++ b/standard/standard_1.php
@@ -412,7 +412,7 @@ function strpbrk ($haystack, $char_list) {}
* If case_insensitivity is true, comparison is
* case insensitive.
*
- * @return int < 0 if main_str from position
+ * @return int 0 if main_str from position
* offset is less than str, >
* 0 if it is greater than str, and 0 if they are equal.
* If offset is equal to or greater than the length of
@@ -431,7 +431,7 @@ function substr_compare ($main_str, $str, $offset, $length = null, $case_insensi
* @param string $str2
* The second string.
*
- * @return int < 0 if str1 is less than
+ * @return int 0 if str1 is less than
* str2; > 0 if
* str1 is greater than
* str2, and 0 if they are equal.
diff --git a/stomp/stomp.php b/stomp/stomp.php
index 27c254de..0adebe56 100644
--- a/stomp/stomp.php
+++ b/stomp/stomp.php
@@ -142,7 +142,7 @@ class StompFrame
/**
* Frame headers
- * @var Array
+ * @var array
*/
public $headers;
diff --git a/uopz/uopz.php b/uopz/uopz.php
index d81eae98..26c2a48a 100644
--- a/uopz/uopz.php
+++ b/uopz/uopz.php
@@ -206,7 +206,7 @@ function uopz_set_mock (string $class, $mock): void {}
* @param mixed $value The value to assign to the property
* @return void
*/
-function uopz_set_property ($class, string $property, mixed $value): void {}
+function uopz_set_property ($class, string $property, $value): void {}
/**
* Provide a return value for an existing function
diff --git a/zend/zend.php b/zend/zend.php
index 71ff0837..b2842d9b 100644
--- a/zend/zend.php
+++ b/zend/zend.php
@@ -162,8 +162,8 @@ class ZendAPI_Queue {
* Jobs are sorted by job id descending.
*
* @param int $status. Filter to jobs by status, 1-success, 0-failed either logical or execution.
- * @param $start_time UNIX timestamp. Get only jobs finished after $start_time.
- * @param $end_time UNIX timestamp. Get only jobs finished before $end_time.
+ * @param int $start_time UNIX timestamp. Get only jobs finished after $start_time.
+ * @param int $end_time UNIX timestamp. Get only jobs finished before $end_time.
* @param int $index. Get jobs starting from the $index-th place.
* @param int $count. Get only $count jobs.
* @param int $total. Pass by reference. Return the total number of jobs statisifed the query criteria.
@@ -350,7 +350,7 @@ class ZendAPI_Job {
/**
* Instantiate a Job object, describe all the information and properties of a job
*
- * @param script $script relative path (relative to document root supplied in ini file) of the script this job should call when it's executing
+ * @param string $script relative path (relative to document root supplied in ini file) of the script this job should call when it's executing
* @return Job
*/
function ZendAPI_Job($script) {}
@@ -399,7 +399,7 @@ class ZendAPI_Job {
/**
* Get the job output
*
- * @return An HTML representing the job output
+ * @return mixed An HTML representing the job output
*/
function getOutput() {}
@@ -483,7 +483,7 @@ function output_cache_fetch($key, $function, $lifetime) {}
* @param $key string cache key
* @param $function string PHP expression
* @param $lifetime int data lifetime in cache (seconds)
- * @return expression output
+ * @return mixed expression output
*/
function output_cache_output($key, $function, $lifetime) {}