1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 02:47:02 +01:00
psalm/src/Psalm/Internal/PropertyMap.php

481 lines
13 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',
2017-05-27 02:05:57 +02:00
'days' => 'mixed',
],
'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' => 'DOMConfiguration',
'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',
],
'mysqli-driver' => [
'client-info' => 'string',
'client-version' => 'string',
'driver-version' => 'string',
'embedded' => 'string',
'reconnect' => 'bool',
2017-05-27 02:05:57 +02:00
'report-mode' => 'int',
],
'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',
],
'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',
],
'tidynode' => [
'value' => 'string',
'name' => 'string',
'type' => 'int',
'line' => 'int',
'column' => 'int',
'proprietary' => 'bool',
'id' => 'int',
'attribute' => 'array',
2017-05-27 02:05:57 +02:00
'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',
],
'mysqli-sql-exception' => [
2017-05-27 02:05:57 +02:00
'sqlstate' => 'string',
],
'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',
'childNodes' => 'DOMNodeList',
'firstChild' => 'DOMNode|null',
'lastChild' => 'DOMNode|null',
'previousSibling' => 'DOMNode|null',
'nextSibling' => 'DOMNode|null',
'attributes' => 'null',
'ownerDocument' => 'DOMDocument',
'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
],
2016-10-30 16:14:36 +01:00
'phpparser\\node\\expr' => [
2017-05-27 02:05:57 +02:00
'inferredType' => 'Psalm\\Type\\Union|null',
'assertions' => 'array<string, non-empty-list<non-empty-list<string>>>|null',
2016-10-30 16:14:36 +01:00
],
'phpparser\\node\\name' => [
2017-05-27 02:05:57 +02:00
'inferredType' => 'Psalm\\Type\\Union|null',
2016-10-30 16:14:36 +01:00
],
'phpparser\\node\\stmt\\return_' => [
2017-05-27 02:05:57 +02:00
'inferredType' => 'Psalm\\Type\\Union|null',
],
'phpparser\\node\\expr\\funccall' => [
2017-05-27 02:05:57 +02:00
'args' => 'array<int, PhpParser\Node\Arg>',
'ifTrueAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
'ifFalseAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
],
'phpparser\\node\\expr\\new_' => [
2017-05-27 02:05:57 +02:00
'args' => 'array<int, 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>',
],
'phpparser\node\expr\list_' => [
2017-11-25 18:31:01 +01:00
'items' => 'array<int, PhpParser\Node\Expr\ArrayItem|null>',
],
'phpparser\\node\\expr\\methodcall' => [
2017-05-27 02:05:57 +02:00
'args' => 'array<int, PhpParser\Node\Arg>',
'ifTrueAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
'ifFalseAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
],
'phpparser\\node\\expr\\staticcall' => [
2017-05-27 02:05:57 +02:00
'args' => 'array<int, PhpParser\Node\Arg>',
2018-07-11 19:01:03 +02:00
'ifTrueAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
'ifFalseAssertions' => 'array<int, Psalm\Storage\Assertion>|null',
],
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>',
],
];