1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/dictionaries/PropertyMap.php

539 lines
15 KiB
PHP
Raw Normal View History

<?php
2018-11-06 03:57:36 +01:00
namespace Psalm\Internal;
2016-11-21 20:51:19 +01:00
/**
* Stolen from https://github.com/etsy/phan/blob/master/src/Phan/Language/Internal/PropertyMap.php
2016-12-15 01:19:25 +01:00
*
2016-11-21 20:51:19 +01:00
* The MIT License (MIT)
* Copyright (c) 2015 Rasmus Lerdorf
* Copyright (c) 2015 Andrew Morrison
2016-12-15 01:19:25 +01:00
*
2016-11-21 20:51:19 +01:00
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
2016-12-15 01:19:25 +01:00
*
2016-11-21 20:51:19 +01:00
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
2016-12-15 01:19:25 +01:00
*
2016-11-21 20:51:19 +01:00
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
return [
'arrayobject' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'limititerator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'solrdocumentfield' => [
'name' => 'string',
'boost' => 'float',
2017-05-27 02:05:57 +02:00
'values' => 'array',
],
'domprocessinginstruction' => [
'target' => 'string',
2017-05-27 02:05:57 +02:00
'data' => 'string',
],
'recursivearrayiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'eventbuffer' => [
'length' => 'int',
2017-05-27 02:05:57 +02:00
'contiguous-space' => 'int',
],
'mongocursor' => [
'slaveokay' => 'boolean',
2017-05-27 02:05:57 +02:00
'timeout' => 'integer',
],
'domxpath' => [
2017-05-27 02:05:57 +02:00
'document' => 'DOMDocument',
],
'domentity' => [
'publicId' => 'string',
'systemId' => 'string',
'notationName' => 'string',
'actualEncoding' => 'string',
'encoding' => 'string',
2017-05-27 02:05:57 +02:00
'version' => 'string',
],
'splminheap' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'mongodb-driver-exception-writeexception' => [
2017-05-27 02:05:57 +02:00
'writeresult' => 'MongoDBDriverWriteResult',
],
'ziparchive' => [
'status' => 'int',
'statusSys' => 'int',
'numFiles' => 'int',
'filename' => 'string',
2017-05-27 02:05:57 +02:00
'comment' => 'string',
],
'solrexception' => [
'sourceline' => 'integer',
'sourcefile' => 'string',
2017-05-27 02:05:57 +02:00
'zif-name' => 'string',
],
'arrayiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'mongoid' => [
2017-05-27 02:05:57 +02:00
'id' => 'string',
],
'dateinterval' => [
'y' => 'integer',
'm' => 'integer',
'd' => 'integer',
'h' => 'integer',
'i' => 'integer',
's' => 'integer',
'f' => 'float', // only present from 7.1 onwards
'invert' => 'integer',
2020-05-30 20:38:12 +02:00
'days' => 'false|int',
],
'tokyotyrantexception' => [
2017-05-27 02:05:57 +02:00
'code' => 'int',
],
'tidy' => [
2017-05-27 02:05:57 +02:00
'errorbuffer' => 'string',
],
'filteriterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'parentiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'recursiveregexiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'error' => [
'message' => 'string',
'code' => 'int',
'file' => 'string',
2017-05-27 02:05:57 +02:00
'line' => 'int',
],
'domexception' => [
2017-05-27 02:05:57 +02:00
'code' => 'int',
],
'domentityreference' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'spldoublylinkedlist' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'domdocumentfragment' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'collator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'streamwrapper' => [
2017-05-27 02:05:57 +02:00
'context' => 'resource',
],
'pdostatement' => [
2017-05-27 02:05:57 +02:00
'querystring' => 'string',
],
'domnotation' => [
'publicId' => 'string',
2017-05-27 02:05:57 +02:00
'systemId' => 'string',
],
'snmpexception' => [
2017-05-27 02:05:57 +02:00
'code' => 'string',
],
'directoryiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'splqueue' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'locale' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'directory' => [
'path' => 'string',
2017-05-27 02:05:57 +02:00
'handle' => 'resource',
],
'splheap' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'domnodelist' => [
2017-05-27 02:05:57 +02:00
'length' => 'int',
],
'mongodb' => [
'w' => 'integer',
2017-05-27 02:05:57 +02:00
'wtimeout' => 'integer',
],
'splpriorityqueue' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'mongoclient' => [
'connected' => 'boolean',
2017-05-27 02:05:57 +02:00
'status' => 'string',
],
'domdocument' => [
'actualEncoding' => 'string',
'config' => 'null',
'doctype' => 'DOMDocumentType',
'documentElement' => 'DOMElement',
'documentURI' => 'string',
'encoding' => 'string',
'formatOutput' => 'bool',
'implementation' => 'DOMImplementation',
'preserveWhiteSpace' => 'bool',
'recover' => 'bool',
'resolveExternals' => 'bool',
'standalone' => 'bool',
'strictErrorChecking' => 'bool',
'substituteEntities' => 'bool',
'validateOnParse' => 'bool',
'version' => 'string',
'xmlEncoding' => 'string',
'xmlStandalone' => 'bool',
2017-05-27 02:05:57 +02:00
'xmlVersion' => 'string',
'ownerDocument' => 'null',
'parentNode' => 'null',
],
'libxmlerror' => [
'level' => 'int',
'code' => 'int',
'column' => 'int',
'message' => 'string',
'file' => 'string',
2017-05-27 02:05:57 +02:00
'line' => 'int',
],
'domimplementation' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'normalizer' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'norewinditerator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'event' => [
2017-05-27 02:05:57 +02:00
'pending' => 'bool',
],
'domdocumenttype' => [
'publicId' => 'string',
'systemId' => 'string',
'name' => 'string',
'entities' => 'DOMNamedNodeMap',
'notations' => 'DOMNamedNodeMap',
2017-05-27 02:05:57 +02:00
'internalSubset' => 'string',
],
'errorexception' => [
2017-05-27 02:05:57 +02:00
'severity' => 'int',
],
'recursivedirectoryiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'domcharacterdata' => [
'data' => 'string',
2017-05-27 02:05:57 +02:00
'length' => 'int',
],
'mongocollection' => [
'db' => 'MongoDB',
'w' => 'integer',
2017-05-27 02:05:57 +02:00
'wtimeout' => 'integer',
],
'mongoint64' => [
2017-05-27 02:05:57 +02:00
'value' => 'string',
],
'mysqli' => [
'affected_rows' => 'int',
'client_info' => 'string',
'client_version' => 'int',
'connect_errno' => 'int',
'connect_error' => 'string',
'errno' => 'int',
'error' => 'string',
'error_list' => 'array',
'field_count' => 'int',
'host_info' => 'string',
'info' => 'string',
'insert_id' => 'int|string',
'protocol_version' => 'string',
'server_info' => 'string',
'server_version' => 'int',
'sqlstate' => 'string',
'thread_id' => 'int',
'warning_count' => 'int',
],
'mysqli_driver' => [
'client_info' => 'string',
'client_version' => 'string',
'driver_version' => 'string',
'embedded' => 'string',
'reconnect' => 'bool',
'report_mode' => 'int'
],
'mysqli_result' => [
'current_field' => 'int',
'field_count' => 'int',
'lengths' => 'array',
'num_rows' => 'int',
'type' => 'mixed',
],
'mysqli_sql_exception' => [
'sqlstate' => 'string'
],
'mysqli_stmt' => [
'affected_rows' => 'int',
'errno' => 'int',
'error' => 'string',
'error_list' => 'array',
'field_count' => 'int',
'id' => 'mixed',
'insert_id' => 'int',
'num_rows' => 'int',
'param_count' => 'int',
'sqlstate' => 'string',
],
'mysqli_warning' => [
'errno' => 'int',
'message' => 'string',
'sqlstate' => 'string',
],
'eventlistener' => [
2017-05-27 02:05:57 +02:00
'fd' => 'int',
],
'splmaxheap' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'regexiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'domelement' => [
'schemaTypeInfo' => 'bool',
2017-05-27 02:05:57 +02:00
'tagName' => 'string',
'attributes' => 'DOMNamedNodeMap<DOMAttr>',
],
'tidynode' => [
'value' => 'string',
'name' => 'string',
'type' => 'int',
'line' => 'int',
'column' => 'int',
'proprietary' => 'bool',
'id' => 'int',
'attribute' => 'array',
'child' => '?array',
],
'recursivecachingiterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'solrresponse' => [
'http-status' => 'integer',
'parser-mode' => 'integer',
'success' => 'bool',
'http-status-message' => 'string',
'http-request-url' => 'string',
'http-raw-request-headers' => 'string',
'http-raw-request' => 'string',
'http-raw-response-headers' => 'string',
'http-raw-response' => 'string',
2017-05-27 02:05:57 +02:00
'http-digested-response' => 'string',
],
'domnamednodemap' => [
2017-05-27 02:05:57 +02:00
'length' => 'int',
],
'splstack' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'numberformatter' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'eventsslcontext' => [
'local-cert' => 'string',
2017-05-27 02:05:57 +02:00
'local-pk' => 'string',
],
'pdoexception' => [
'errorinfo' => 'array',
2017-05-27 02:05:57 +02:00
'code' => 'string',
],
'domnode' => [
'nodeName' => 'string',
'nodeValue' => 'string',
'nodeType' => 'int',
'parentNode' => 'DOMNode|null',
'childNodes' => 'DOMNodeList',
'firstChild' => 'DOMNode|null',
'lastChild' => 'DOMNode|null',
'previousSibling' => 'DOMNode|null',
'nextSibling' => 'DOMNode|null',
'attributes' => 'null',
'ownerDocument' => 'DOMDocument|null',
'namespaceURI' => 'string|null',
'prefix' => 'string',
'localName' => 'string',
'baseURI' => 'string|null',
2017-05-27 02:05:57 +02:00
'textContent' => 'string',
],
'domattr' => [
'name' => 'string',
'ownerElement' => 'DOMElement',
'schemaTypeInfo' => 'bool',
'specified' => 'bool',
2017-05-27 02:05:57 +02:00
'value' => 'string',
],
'simplexmliterator' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
],
'snmp' => [
'max-oids' => 'int',
'valueretrieval' => 'int',
'quick-print' => 'bool',
'enum-print' => 'bool',
'oid-output-format' => 'int',
'oid-increasing-check' => 'bool',
'exceptions-enabled' => 'int',
2017-05-27 02:05:57 +02:00
'info' => 'array',
],
'mongoint32' => [
2017-05-27 02:05:57 +02:00
'value' => 'string',
],
'xmlreader' => [
2018-06-06 05:42:02 +02:00
'attributeCount' => 'int',
'baseURI' => 'string',
'depth' => 'int',
2018-06-06 05:42:02 +02:00
'hasAttributes' => 'bool',
'hasValue' => 'bool',
'isDefault' => 'bool',
'isEmptyElement' => 'bool',
'localName' => 'string',
'name' => 'string',
'namespaceURI' => 'string',
'nodeType' => 'int',
'prefix' => 'string',
'value' => 'string',
2018-06-06 05:42:02 +02:00
'xmlLang' => 'string',
],
'eventbufferevent' => [
'fd' => 'integer',
'priority' => 'integer',
'input' => 'EventBuffer',
2017-05-27 02:05:57 +02:00
'output' => 'EventBuffer',
],
'domtext' => [
2017-05-27 02:05:57 +02:00
'wholeText' => 'string',
],
'exception' => [
'message' => 'string',
'code' => 'int',
'file' => 'string',
2017-05-27 02:05:57 +02:00
'line' => 'int',
],
2016-12-24 12:03:55 +01:00
'reflectionclass' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
2016-12-24 12:03:55 +01:00
],
'reflectionmethod' => [
'class' => 'string',
2017-05-27 02:05:57 +02:00
'name' => 'string',
2016-12-24 12:03:55 +01:00
],
'reflectionparameter' => [
2017-05-27 02:05:57 +02:00
'name' => 'string',
2016-12-24 12:03:55 +01:00
],
'phpparser\\node\\expr\\funccall' => [
2020-10-28 17:45:26 +01:00
'args' => 'list<PhpParser\Node\Arg>',
],
'phpparser\\node\\expr\\new_' => [
2020-10-28 17:45:26 +01:00
'args' => 'list<PhpParser\Node\Arg>',
],
2017-11-25 18:31:01 +01:00
'phpparser\\node\\expr\\array_' => [
2018-01-14 00:33:32 +01:00
'items' => 'array<int, PhpParser\Node\Expr\ArrayItem|null>',
],
2020-01-21 05:19:48 +01:00
'phpparser\\node\\expr\\list_' => [
2017-11-25 18:31:01 +01:00
'items' => 'array<int, PhpParser\Node\Expr\ArrayItem|null>',
],
'phpparser\\node\\expr\\methodcall' => [
2020-10-28 17:45:26 +01:00
'args' => 'list<PhpParser\Node\Arg>',
],
'phpparser\\node\\expr\\staticcall' => [
2020-10-28 17:45:26 +01:00
'args' => 'list<PhpParser\Node\Arg>',
],
2020-10-28 18:48:13 +01:00
'phpparser\\node\\expr\\arrowfunction' => [
'params' => 'list<PhpParser\Node\Param>',
],
'phpparser\\node\\expr\\closure' => [
'params' => 'list<PhpParser\Node\Param>',
],
2020-05-15 16:18:05 +02:00
'phpparser\\node\\name' => [
'parts' => 'non-empty-array<non-empty-string>',
],
2016-12-25 02:08:58 +01:00
'phpparser\\node\\stmt\\namespace_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\if_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\elseif_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\else_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\for_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\foreach_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\trycatch' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\catch_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\finally_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\case_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\while_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\do_' => [
2017-05-27 02:05:57 +02:00
'stmts' => 'array<int, PhpParser\Node\Stmt>',
2016-12-25 02:08:58 +01:00
],
'phpparser\\node\\stmt\\class_' => [
'stmts' => 'array<int, PhpParser\Node\Stmt>',
],
'phpparser\\node\\stmt\\trait_' => [
'stmts' => 'array<int, PhpParser\Node\Stmt>',
],
'phpparser\\node\\stmt\\interface_' => [
'stmts' => 'array<int, PhpParser\Node\Stmt>',
],
2020-08-30 22:30:43 +02:00
'phpparser\\node\\matcharm' => [
'conds' => 'null|non-empty-list<PhpParser\Node\Expr>',
],
'rdkafka\\message' => [
'err' => 'int',
'topic_name' => 'string',
'partition' => 'int',
'payload' => 'string',
'key' => 'string|null',
'offset' => 'int',
'timestamp' => 'int',
'headers' => 'array<string, string>|null',
],
'soapfault' => [
'faultcode' => 'string',
'faultstring' => 'string',
'faultactor' => 'string',
'detail' => 'string',
'_name' => 'string',
'headerfault' => 'string',
],
];