diff --git a/resources/functionMap.php b/resources/functionMap.php index fd4ba6a6fa..af5afebd1d 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -395,7 +395,7 @@ 'BadFunctionCallException::getLine' => ['int'], 'BadFunctionCallException::getMessage' => ['string'], 'BadFunctionCallException::getPrevious' => ['(?Throwable)|(?BadFunctionCallException)'], -'BadFunctionCallException::getTrace' => ['array'], +'BadFunctionCallException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'BadFunctionCallException::getTraceAsString' => ['string'], 'BadMethodCallException::__clone' => ['void'], 'BadMethodCallException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?BadMethodCallException)'], @@ -405,7 +405,7 @@ 'BadMethodCallException::getLine' => ['int'], 'BadMethodCallException::getMessage' => ['string'], 'BadMethodCallException::getPrevious' => ['(?Throwable)|(?BadMethodCallException)'], -'BadMethodCallException::getTrace' => ['array'], +'BadMethodCallException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'BadMethodCallException::getTraceAsString' => ['string'], 'base64_decode' => ['string|false', 'str'=>'string', 'strict='=>'bool'], 'base64_encode' => ['string', 'str'=>'string'], @@ -989,7 +989,7 @@ 'ClosedGeneratorException::getLine' => ['int'], 'ClosedGeneratorException::getMessage' => ['string'], 'ClosedGeneratorException::getPrevious' => ['Throwable|ClosedGeneratorException|null'], -'ClosedGeneratorException::getTrace' => ['array'], +'ClosedGeneratorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'ClosedGeneratorException::getTraceAsString' => ['string'], 'closedir' => ['void', 'dir_handle='=>'resource'], 'closelog' => ['bool'], @@ -1786,7 +1786,7 @@ 'dcgettext' => ['string', 'domain_name'=>'string', 'msgid'=>'string', 'category'=>'int'], 'dcngettext' => ['string', 'domain'=>'string', 'msgid1'=>'string', 'msgid2'=>'string', 'n'=>'int', 'category'=>'int'], 'deaggregate' => ['', 'object'=>'object', 'class_name='=>'string'], -'debug_backtrace' => ['array', 'options='=>'int|bool', 'limit='=>'int'], +'debug_backtrace' => ['list', 'options='=>'int|bool', 'limit='=>'int'], 'debug_print_backtrace' => ['void', 'options='=>'int|bool', 'limit='=>'int'], 'debug_zval_dump' => ['void', '...var'=>'mixed'], 'debugger_connect' => [''], @@ -1883,7 +1883,7 @@ 'DomainException::getLine' => ['int'], 'DomainException::getMessage' => ['string'], 'DomainException::getPrevious' => ['Throwable|DomainException|null'], -'DomainException::getTrace' => ['array'], +'DomainException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'DomainException::getTraceAsString' => ['string'], 'DOMAttr::__construct' => ['void', 'name'=>'string', 'value='=>'string'], 'DOMAttr::isId' => ['bool'], @@ -2331,7 +2331,7 @@ 'Error::getLine' => ['int'], 'Error::getMessage' => ['string'], 'Error::getPrevious' => ['Throwable|Error|null'], -'Error::getTrace' => ['array'], +'Error::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'Error::getTraceAsString' => ['string'], 'error_clear_last' => ['void'], 'error_get_last' => ['?array{type:int,message:string,file:string,line:int}'], @@ -2346,7 +2346,7 @@ 'ErrorException::getMessage' => ['string'], 'ErrorException::getPrevious' => ['Throwable|ErrorException|null'], 'ErrorException::getSeverity' => ['int'], -'ErrorException::getTrace' => ['array'], +'ErrorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'ErrorException::getTraceAsString' => ['string'], 'escapeshellarg' => ['string', 'arg'=>'string'], 'escapeshellcmd' => ['string', 'command'=>'string'], @@ -2625,7 +2625,7 @@ 'Exception::getLine' => ['int'], 'Exception::getMessage' => ['string'], 'Exception::getPrevious' => ['(?Throwable)|(?Exception)'], -'Exception::getTrace' => ['array'], +'Exception::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'Exception::getTraceAsString' => ['string'], 'exec' => ['string', 'command'=>'string', '&w_output='=>'array', '&w_return_value='=>'int'], 'exif_imagetype' => ['int|false', 'imagefile'=>'string'], @@ -5616,7 +5616,7 @@ 'InvalidArgumentException::getLine' => ['int'], 'InvalidArgumentException::getMessage' => ['string'], 'InvalidArgumentException::getPrevious' => ['Throwable|InvalidArgumentException|null'], -'InvalidArgumentException::getTrace' => ['array'], +'InvalidArgumentException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'InvalidArgumentException::getTraceAsString' => ['string'], 'ip2long' => ['int|false', 'ip_address'=>'string'], 'iptcembed' => ['string|bool', 'iptcdata'=>'string', 'jpeg_file_name'=>'string', 'spool='=>'int'], @@ -5913,7 +5913,7 @@ 'LengthException::getLine' => ['int'], 'LengthException::getMessage' => ['string'], 'LengthException::getPrevious' => ['Throwable|LengthException|null'], -'LengthException::getTrace' => ['array'], +'LengthException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'LengthException::getTraceAsString' => ['string'], 'levenshtein' => ['int', 'str1'=>'string', 'str2'=>'string'], 'levenshtein\'1' => ['int', 'str1'=>'string', 'str2'=>'string', 'cost_ins'=>'int', 'cost_rep'=>'int', 'cost_del'=>'int'], @@ -5993,7 +5993,7 @@ 'LogicException::getLine' => ['int'], 'LogicException::getMessage' => ['string'], 'LogicException::getPrevious' => ['Throwable|LogicException|null'], -'LogicException::getTrace' => ['array'], +'LogicException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'LogicException::getTraceAsString' => ['string'], 'long2ip' => ['string|false', 'proper_address'=>'int'], 'lstat' => ['array|false', 'filename'=>'string'], @@ -6657,7 +6657,7 @@ 'MongoCursorException::getLine' => ['int'], 'MongoCursorException::getMessage' => ['string'], 'MongoCursorException::getPrevious' => ['Exception|Throwable'], -'MongoCursorException::getTrace' => ['array'], +'MongoCursorException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoCursorException::getTraceAsString' => ['string'], 'MongoCursorInterface::__construct' => ['void'], 'MongoCursorInterface::batchSize' => ['MongoCursorInterface', 'batchSize'=>'int'], @@ -6749,7 +6749,7 @@ 'MongoDB\Driver\Exception\RuntimeException::getLine' => ['int'], 'MongoDB\Driver\Exception\RuntimeException::getMessage' => ['string'], 'MongoDB\Driver\Exception\RuntimeException::getPrevious' => ['RuntimeException|Throwable'], -'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['array'], +'MongoDB\Driver\Exception\RuntimeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoDB\Driver\Exception\RuntimeException::getTraceAsString' => ['string'], 'MongoDB\Driver\Exception\WriteException::__clone' => ['void'], 'MongoDB\Driver\Exception\WriteException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?RuntimeException)|(?Throwable)'], @@ -6760,7 +6760,7 @@ 'MongoDB\Driver\Exception\WriteException::getLine' => ['int'], 'MongoDB\Driver\Exception\WriteException::getMessage' => ['string'], 'MongoDB\Driver\Exception\WriteException::getPrevious' => ['RuntimeException|Throwable'], -'MongoDB\Driver\Exception\WriteException::getTrace' => ['array'], +'MongoDB\Driver\Exception\WriteException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoDB\Driver\Exception\WriteException::getTraceAsString' => ['string'], 'MongoDB\Driver\Exception\WriteException::getWriteResult' => ['MongoDB\Driver\WriteResult'], 'MongoDB\Driver\Manager::__construct' => ['void', 'uri'=>'string', 'options='=>'array', 'driverOptions='=>'array'], @@ -6836,7 +6836,7 @@ 'MongoException::getLine' => ['int'], 'MongoException::getMessage' => ['string'], 'MongoException::getPrevious' => ['Exception|Throwable'], -'MongoException::getTrace' => ['array'], +'MongoException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoException::getTraceAsString' => ['string'], 'MongoGridFS::__construct' => ['void', 'db'=>'MongoDB', 'prefix='=>'string', 'chunks='=>'mixed'], 'MongoGridFS::__get' => ['MongoCollection', 'name'=>'string'], @@ -6947,7 +6947,7 @@ 'MongoResultException::getLine' => ['int'], 'MongoResultException::getMessage' => ['string'], 'MongoResultException::getPrevious' => ['Exception|Throwable'], -'MongoResultException::getTrace' => ['array'], +'MongoResultException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoResultException::getTraceAsString' => ['string'], 'MongoTimestamp::__construct' => ['void', 'sec='=>'int', 'inc='=>'int'], 'MongoTimestamp::__toString' => ['string'], @@ -6967,7 +6967,7 @@ 'MongoWriteConcernException::getLine' => ['int'], 'MongoWriteConcernException::getMessage' => ['string'], 'MongoWriteConcernException::getPrevious' => ['Exception|Throwable'], -'MongoWriteConcernException::getTrace' => ['array'], +'MongoWriteConcernException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'MongoWriteConcernException::getTraceAsString' => ['string'], 'monitor_custom_event' => ['void', 'class'=>'string', 'text'=>'string', 'severe='=>'int', 'user_data='=>'mixed'], 'monitor_httperror_event' => ['void', 'error_code'=>'int', 'url'=>'string', 'severe='=>'int'], @@ -8136,7 +8136,7 @@ 'OutOfBoundsException::getLine' => ['int'], 'OutOfBoundsException::getMessage' => ['string'], 'OutOfBoundsException::getPrevious' => ['Throwable|OutOfBoundsException|null'], -'OutOfBoundsException::getTrace' => ['array'], +'OutOfBoundsException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'OutOfBoundsException::getTraceAsString' => ['string'], 'OutOfRangeException::__clone' => ['void'], 'OutOfRangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?OutOfRangeException)'], @@ -8146,7 +8146,7 @@ 'OutOfRangeException::getLine' => ['int'], 'OutOfRangeException::getMessage' => ['string'], 'OutOfRangeException::getPrevious' => ['Throwable|OutOfRangeException|null'], -'OutOfRangeException::getTrace' => ['array'], +'OutOfRangeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'OutOfRangeException::getTraceAsString' => ['string'], 'output_add_rewrite_var' => ['bool', 'name'=>'string', 'value'=>'string'], 'output_reset_rewrite_vars' => ['bool'], @@ -8158,7 +8158,7 @@ 'OverflowException::getLine' => ['int'], 'OverflowException::getMessage' => ['string'], 'OverflowException::getPrevious' => ['Throwable|OverflowException|null'], -'OverflowException::getTrace' => ['array'], +'OverflowException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'OverflowException::getTraceAsString' => ['string'], 'overload' => ['', 'class_name'=>'string'], 'override_function' => ['bool', 'function_name'=>'string', 'function_args'=>'string', 'function_code'=>'string'], @@ -8234,7 +8234,7 @@ 'ParseError::getLine' => ['int'], 'ParseError::getMessage' => ['string'], 'ParseError::getPrevious' => ['Throwable|ParseError|null'], -'ParseError::getTrace' => ['array'], +'ParseError::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'ParseError::getTraceAsString' => ['string'], 'parsekit_compile_file' => ['array', 'filename'=>'string', 'errors='=>'array', 'options='=>'int'], 'parsekit_compile_string' => ['array', 'phpcode'=>'string', 'errors='=>'array', 'options='=>'int'], @@ -8465,7 +8465,7 @@ 'PDOException::getLine' => [''], 'PDOException::getMessage' => [''], 'PDOException::getPrevious' => [''], -'PDOException::getTrace' => [''], +'PDOException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'PDOException::getTraceAsString' => [''], 'PDOStatement::__sleep' => ['array'], 'PDOStatement::__wakeup' => ['void'], @@ -9067,7 +9067,7 @@ 'RangeException::getLine' => ['int'], 'RangeException::getMessage' => ['string'], 'RangeException::getPrevious' => ['Throwable|RangeException|null'], -'RangeException::getTrace' => ['array'], +'RangeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'RangeException::getTraceAsString' => ['string'], 'rar_allow_broken_set' => ['bool', 'rarfile'=>'RarArchive', 'allow_broken'=>'bool'], 'rar_broken_is' => ['bool', 'rarfile'=>'RarArchive'], @@ -9110,7 +9110,7 @@ 'RarException::getLine' => ['int'], 'RarException::getMessage' => ['string'], 'RarException::getPrevious' => ['Exception|Throwable'], -'RarException::getTrace' => ['array'], +'RarException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'RarException::getTraceAsString' => ['string'], 'RarException::isUsingExceptions' => ['bool'], 'RarException::setUsingExceptions' => ['void', 'using_exceptions'=>'bool'], @@ -9776,7 +9776,7 @@ 'ReflectionGenerator::getExecutingLine' => ['int'], 'ReflectionGenerator::getFunction' => ['ReflectionFunctionAbstract'], 'ReflectionGenerator::getThis' => ['object'], -'ReflectionGenerator::getTrace' => ['array', 'options'=>'int'], +'ReflectionGenerator::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}', 'options'=>'int'], 'ReflectionMethod::__construct' => ['void', 'class'=>'string|object', 'name'=>'string'], 'ReflectionMethod::__construct\'1' => ['void', 'class_method'=>'string'], 'ReflectionMethod::__toString' => ['string'], @@ -9957,7 +9957,7 @@ 'RuntimeException::getLine' => ['int'], 'RuntimeException::getMessage' => ['string'], 'RuntimeException::getPrevious' => ['Throwable|RuntimeException|null'], -'RuntimeException::getTrace' => ['array'], +'RuntimeException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'RuntimeException::getTraceAsString' => ['string'], 'SAMConnection::commit' => ['bool'], 'SAMConnection::connect' => ['bool', 'protocol'=>'string', 'properties='=>'array'], @@ -10814,7 +10814,7 @@ 'SolrException::getLine' => ['int'], 'SolrException::getMessage' => ['string'], 'SolrException::getPrevious' => ['Exception|Throwable'], -'SolrException::getTrace' => ['array'], +'SolrException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'SolrException::getTraceAsString' => ['string'], 'SolrGenericResponse::__construct' => ['void'], 'SolrGenericResponse::__destruct' => [''], @@ -10839,7 +10839,7 @@ 'SolrIllegalArgumentException::getLine' => ['int'], 'SolrIllegalArgumentException::getMessage' => ['string'], 'SolrIllegalArgumentException::getPrevious' => ['Exception|Throwable'], -'SolrIllegalArgumentException::getTrace' => ['array'], +'SolrIllegalArgumentException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'SolrIllegalArgumentException::getTraceAsString' => ['string'], 'SolrIllegalOperationException::__clone' => ['void'], 'SolrIllegalOperationException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Exception)|(?Throwable)'], @@ -10851,7 +10851,7 @@ 'SolrIllegalOperationException::getLine' => ['int'], 'SolrIllegalOperationException::getMessage' => ['string'], 'SolrIllegalOperationException::getPrevious' => ['Exception|Throwable'], -'SolrIllegalOperationException::getTrace' => ['array'], +'SolrIllegalOperationException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'SolrIllegalOperationException::getTraceAsString' => ['string'], 'SolrInputDocument::__clone' => ['void'], 'SolrInputDocument::__construct' => ['void'], @@ -11159,7 +11159,7 @@ 'SolrServerException::getLine' => ['int'], 'SolrServerException::getMessage' => ['string'], 'SolrServerException::getPrevious' => ['Exception|Throwable'], -'SolrServerException::getTrace' => ['array'], +'SolrServerException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'SolrServerException::getTraceAsString' => ['string'], 'SolrUpdateResponse::__construct' => ['void'], 'SolrUpdateResponse::__destruct' => [''], @@ -12238,7 +12238,7 @@ 'Throwable::getLine' => ['int'], 'Throwable::getMessage' => ['string'], 'Throwable::getPrevious' => ['Throwable|null'], -'Throwable::getTrace' => ['array'], +'Throwable::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'Throwable::getTraceAsString' => ['string'], 'tidy::__construct' => ['void', 'filename='=>'string', 'config='=>'', 'encoding='=>'string', 'use_include_path='=>'bool'], 'tidy::body' => ['tidyNode'], @@ -12558,7 +12558,7 @@ 'TypeError::getLine' => ['int'], 'TypeError::getMessage' => ['string'], 'TypeError::getPrevious' => ['Throwable|TypeError|null'], -'TypeError::getTrace' => ['array'], +'TypeError::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'TypeError::getTraceAsString' => ['string'], 'uasort' => ['bool', '&rw_array_arg'=>'array', 'callback'=>'callable(mixed,mixed):int'], 'ucfirst' => ['string', 'str'=>'string'], @@ -12619,7 +12619,7 @@ 'UnderflowException::getLine' => ['int'], 'UnderflowException::getMessage' => ['string'], 'UnderflowException::getPrevious' => ['Throwable|UnderflowException|null'], -'UnderflowException::getTrace' => ['array'], +'UnderflowException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'UnderflowException::getTraceAsString' => ['string'], 'UnexpectedValueException::__clone' => ['void'], 'UnexpectedValueException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'(?Throwable)|(?UnexpectedValueException)'], @@ -12629,7 +12629,7 @@ 'UnexpectedValueException::getLine' => ['int'], 'UnexpectedValueException::getMessage' => ['string'], 'UnexpectedValueException::getPrevious' => ['Throwable|UnexpectedValueException|null'], -'UnexpectedValueException::getTrace' => ['array'], +'UnexpectedValueException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'UnexpectedValueException::getTraceAsString' => ['string'], 'uniqid' => ['non-empty-string', 'prefix='=>'string', 'more_entropy='=>'bool'], 'unixtojd' => ['int|false', 'timestamp='=>'int'], @@ -12724,7 +12724,7 @@ 'V8JsScriptException::getLine' => ['int'], 'V8JsScriptException::getMessage' => ['string'], 'V8JsScriptException::getPrevious' => ['Exception|Throwable'], -'V8JsScriptException::getTrace' => ['array'], +'V8JsScriptException::getTrace' => ['array{function:string,line?:int,file?:string,class?:class-string,type?:string,args?:mixed[],object?:object}'], 'V8JsScriptException::getTraceAsString' => ['string'], 'var_dump' => ['void', 'var'=>'mixed', '...args='=>'mixed'], 'var_export' => ['string|null', 'var'=>'mixed', 'return='=>'bool'], diff --git a/src/Reflection/Runtime/RuntimeReflectionProvider.php b/src/Reflection/Runtime/RuntimeReflectionProvider.php index 7ec7d9d16b..faf34914cb 100644 --- a/src/Reflection/Runtime/RuntimeReflectionProvider.php +++ b/src/Reflection/Runtime/RuntimeReflectionProvider.php @@ -388,8 +388,7 @@ private function isExistsCheckCall(): bool foreach ($debugBacktrace as $traceStep) { if ( - isset($traceStep['function']) - && isset($existsCallTypes[$traceStep['function']]) + isset($existsCallTypes[$traceStep['function']]) // We must ignore the self::hasClass calls && (!isset($traceStep['file']) || $traceStep['file'] !== __FILE__) ) { diff --git a/stubs/Exception.stub b/stubs/Exception.stub index e95c24b250..078b13606b 100644 --- a/stubs/Exception.stub +++ b/stubs/Exception.stub @@ -27,7 +27,7 @@ interface Throwable public function getLine(); /** - * @return list> + * @return list * @throws void */ public function getTrace(); @@ -78,7 +78,7 @@ class Exception implements Throwable final public function getLine(): int {} /** - * @return list> + * @return list * @throws void */ final public function getTrace(): array {} @@ -125,7 +125,7 @@ class Error implements Throwable final public function getLine(): int {} /** - * @return list> + * @return list * @throws void */ final public function getTrace(): array {}