forked from diablomedia/zf1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon
139 lines (139 loc) · 11.9 KB
/
phpstan.neon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
parameters:
bootstrap: %rootDir%/../../../phpstan-bootstrap.php
excludes_analyse:
- 'library/Zend/EventManager/ResponseCollection.php'
- 'library/Zend/Stdlib/SplPriorityQueue.php'
- 'library/Zend/Tool/Framework/Provider/DocblockManifestable.php'
ignoreErrors:
######################################################################################
# Level 0 errors that require code changes (or missing extensions/third party libs)
######################################################################################
- '#.+::__construct\(\) does not call parent constructor from .+\.#'
- '#Access to an undefined property .+\.#'
- '#Array has [\d]+ duplicate keys with value .+\.#'
- '#Call to an undefined method Zend_Barcode_Object_ObjectAbstract::getChecksum\(\)\.#'
- '#Call to an undefined method Zend_Gdata_HttpClient::_streamingRequest\(\)\.#'
- '#Call to an undefined method Zend_XmlRpc_Generator_GeneratorAbstract::_init\(\)\.#'
- '#Call to an undefined method Zend_XmlRpc_Value::_generateXml\(\)\.#'
- '#Class .+ constructor invoked with [\d]+ parameters?, .+ required\.#'
- '#Class Zend_Pdf_FileParser_Font_OpenType_Type1 not found\.#'
- '#Constructor of class .+ has an unused parameter .+.#'
- '#Function .+ invoked with [\d] parameters?, .+ required\.#'
- '#Function bitset_empty not found\.#'
- '#Function bitset_in not found\.#'
- '#Function bitset_incl not found\.#'
- '#Function bitset_to_array not found\.#'
- '#Function bitset_union not found\.#'
- '#Instantiated class Zend_Pdf_FileParser_Image_Jpeg not found\.#'
- '#Instantiated class Zend_Pdf_FileParser_Image_Tiff not found\.#'
- '#Method .+ invoked with [\d]+ parameters?, .+ required\.#'
- '#Parameter .+ has invalid typehint type Zend_Pdf_Element_LayoutBox\.#'
- '#Result of method .+ \(void\) is used\.#'
- '#Result of static method .+ \(void\) is used\.#'
- '#Undefined variable: .+#'
- '#Using \$this in static method .+\.#'
########################################################
# Level 1 errors that require code changes
########################################################
- '#Variable \$.+ might not be defined\.#'
- '#Variable \$.+ in isset\(\) always exists and is not nullable\.#'
- '#Variable \$.+ in isset\(\) is never defined\.#'
#####################################################################################
# Level 2 errors that require code changes (or missing extensions/third party libs)
#####################################################################################
- '#Call to an undefined method object::getASClassName\(\)\.#'
- '#Call to an undefined method object::select\(\)\.#'
- '#Call to an undefined method object::setRegistry\(\)\.#'
- '#Call to an undefined method object::toArray\(\)\.#'
- '#Call to an undefined method object::toString\(\)\.#'
- '#Call to an undefined method Reflection::getPrototypes\(\)\.#'
- '#Call to an undefined method Reflector::.+\(\)\.#'
- '#Call to an undefined method Zend_Amf_Auth_Abstract::getAcl\(\)\.#'
- '#Call to an undefined method Zend_Feed_Reader_Extension_EntryAbstract::.+\(\)\.#'
- '#Call to an undefined method Zend_Feed_Reader_Extension_FeedAbstract::.+\(\)\.#'
- '#Call to an undefined method Zend_Gdata::decodeRequest\(\)\.#'
- '#Call to an undefined method Zend_Gdata_App_Base::setColumnName\(\)\.#'
- '#Call to an undefined method Zend_Gdata_App_Exception::getResponse\(\)\.#'
- '#Call to an undefined method Zend_Gdata_App_MediaSource::getFilename\(\)\.#'
- '#Call to an undefined method Zend_Gdata_Query::setUser\(\)\.#'
- '#Call to an undefined method Zend_Http_Client::.+\(\)\.#'
- '#Call to an undefined method Zend_Markup_Renderer_TokenConverterInterface::setRenderer\(\)\.#'
- '#Call to an undefined method Zend_Memory_Container::destroy\(\)\.#'
- '#Call to an undefined method Zend_Memory_Container_Interface::processUpdate\(\)\.#'
- '#Call to an undefined method Zend_Mobile_Push_Message_Abstract::.+\(\)\.#'
- '#Call to an undefined method Zend_Pdf_Element::.+\(\)\.#'
- '#Call to an undefined method Zend_Pdf_Element_Object::.+\(\)\.#'
- '#Call to an undefined method Zend_Pdf_Element_Reference::getKeys\(\)\.#'
- '#Call to an undefined method Zend_Pdf_Font::.+\(\)\.#'
- '#Call to an undefined method Zend_Pdf_Trailer::.+\(\)\.#'
- '#Call to an undefined method Zend_Queue_Message::getJobId\(\)\.#'
- '#Call to an undefined method Zend_Reflection_Docblock_Tag::.+\(\)\.#'
- '#Call to an undefined method Zend_Search_Lucene_Search_Query::.+\(\)\.#'
- '#Call to an undefined method Zend_Search_Lucene_Storage_File::close\(\)\.#'
- '#Call to an undefined method Zend_Server_Reflection_Class::newInstance\(\)\.#'
- '#Call to an undefined method Zend_Server_Reflection_Method::invokeArgs\(\)\.#'
- '#Call to an undefined method Zend_Service_WindowsAzure_Storage_Table::commit\(\)\.#'
- '#Call to an undefined method Zend_Soap_Client::.+\(\)\.#'
- '#Call to an undefined method Zend_Tool_Framework_Manifest_Metadata::.+\(\)\.#'
- '#Call to an undefined method Zend_Tool_Framework_Provider_Interface::.+\(\)\.#'
- '#Call to an undefined method Zend_Tool_Framework_Registry_Interface::.+\(\)\.#'
- '#Call to an undefined method Zend_Tool_Project_Context_Interface::getCodeGenerator\(\)\.#'
- '#Call to an undefined method Zend_Tool_Project_Profile_Resource::.+\(\)\.#'
- '#Call to an undefined method Zend_Tool_Project_Profile_Resource_Container::.+\(\)\.#'
- '#Call to an undefined method Zend_Uri::.+\(\)\.#'
- '#Call to an undefined method Zend_XmlRpc_Client_ServerProxy::.+\(\)\.#'
- '#Cannot access property \$commands on array\.#'
- '#Cannot access property \$description on array\.#'
- '#Cannot access property \$footers on array\.#'
- '#Cannot access property \$headers on array\.#'
- '#Cannot call method closeFileHandle\(\) on string\.#'
- '#Cannot call method read\(\) on string\.#'
- '#PHPDoc tag @param references unknown parameter \$args#'
##########################################################################
# Level 3 errors that require code changes or are false positives
##########################################################################
- '#Argument of an invalid type object supplied for foreach, only iterables are supported\.#'
- '#Cannot call method normalize\(\) on null\.#'
- '#Cannot call method sumOfSquaredWeights\(\) on null\.#'
- '#Cannot clone non-object variable \$sxe of type DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method .+ with return type void returns void but should not return anything\.#'
- '#Method Zend_Amf_Adobe_Introspector::_phpTypeToAS\(\) should return string but returns false\|string\.#'
- '#Method Zend_Amf_Parse_Amf0_Deserializer::readXmlString\(\) should return false\|SimpleXMLElement but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method Zend_Amf_Parse_Amf3_Deserializer::readXmlString\(\) should return false\|SimpleXMLElement but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method Zend_Cloud_DocumentService_Adapter_SimpleDb::select\(\) should return Zend_Cloud_DocumentService_Adapter_SimpleDb_Query but returns object\.#'
- '#Method Zend_Cloud_DocumentService_Adapter_WindowsAzure::select\(\) should return Zend_Cloud_DocumentService_Query but returns object\.#'
- '#Method Zend_Cloud_StorageService_Factory::getAdapter\(\) should return Zend_Cloud_StorageService_Adapter but returns Zend_Cloud_DocumentService_Adapter\|Zend_Cloud_QueueService_Adapter\|Zend_Cloud_StorageService_Adapter\.#'
- '#Method Zend_Gdata_.+::.+Entry\(\) should return string\|Zend_Gdata_.+Entry but returns string\|Zend_Gdata_App_Entry\.#'
- '#Method Zend_Gdata_.+::.+Feed\(\) should return string\|Zend_Gdata_.+Feed but returns string\|Zend_Gdata_App_Feed\.#'
- '#Method Zend_Gdata_.+::insert.+\(\) should return Zend_Gdata_.+Entry but returns Zend_Gdata_App_Entry\.#'
- '#Method Zend_Gdata_.+::update.+\(\) should return Zend_Gdata_.+Entry but returns Zend_Gdata_App_Entry\.#'
- '#Method Zend_Gdata_App::getEntry\(\) should return string\|Zend_Gdata_App_Entry but returns string\|Zend_Gdata_App_Feed\.#'
- '#Method Zend_Serializer::getDefaultAdapter\(\) should return Zend_Serializer_Adapter_AdapterInterface but returns string\|Zend_Serializer_Adapter_AdapterInterface\.#'
- '#Method Zend_Service_Audioscrobbler::_getInfo\(\) should return SimpleXMLElement but returns DOMDocument\|SimpleXMLElement\.#'
- '#Method Zend_Service_Ebay_Finding::.+ should return Zend_Service_Ebay_Finding_Response_.+ but returns Zend_Service_Ebay_Finding_Response_Abstract\.#'
- '#Method Zend_Service_Ebay_Finding::_parseResponse\(\) should return DOMDocument but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method Zend_Service_SqlAzure_Management_Client::_parseResponse\(\) should return false\|SimpleXMLElement but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method Zend_Service_WindowsAzure_Management_Client::_parseResponse\(\) should return false\|SimpleXMLElement but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Method Zend_Service_WindowsAzure_Storage::_parseResponse\(\) should return false\|SimpleXMLElement but returns DOMDocument\|false\|SimpleXMLElement\.#'
- '#Property Zend_Feed_Element::\$_element \(DOMDocument\|DOMElement\|string\) does not accept DOMDocument\|SimpleXMLElement\.#'
- '#Property Zend_Markup_Renderer_RendererAbstract::\$_group \(string\) does not accept string\|true\.#'
- '#Property Zend_Pdf_Element_Stream::\$value \(Zend_Memory_Container\) does not accept Zend_Memory_Container_Interface\.#'
#########################################################
# Level 4 errors that require code changes
#########################################################
- '#Call to function is_null\(\) will always evaluate to false\.#'
- '#Casting to .+ something that.s already .+\.#'
- '#Property Zend_Pdf_Style::\$_lineDashingPattern \(array\) does not accept array\|int\.#'
# This one happens in Zend_Serializer_Adapter_Igbinary, it seems ZF is expecting igbinary_serialize to return false, but can't find any evidence that
# it does that.
- '#Strict comparison using === between string and false will always evaluate to false.#'
# This only happens in Zend_Service_Twitter:701, it seems intentional, since if it's not exactly "2" (int), then it throws an error. "false" applies here
- '#Strict comparison using !== between bool and int will always evaluate to true\.#'
# The object oriented style of DateTime does not return false, so this check probably doesn't need to be there in Zend_XmlRpc_Value_DateTime:67
- '#Strict comparison using === between DateTime and false will always evaluate to false\.#'
# These are typically checking function arguments (or returns from other functions that don't explicitly say they return null) to make sure they were set to something,
# and without scalar type-hints, has to be done
- '#Strict comparison using === between .+ and null will always evaluate to false\.#'
- '#Strict comparison using === between null and .+ will always evaluate to false\.#'
- '#Strict comparison using !== between null and .+ will always evaluate to true\.#'
- '#Strict comparison using !== between .+ and null will always evaluate to true\.#'