1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
Commit Graph

107 Commits

Author SHA1 Message Date
Bruce Weirdan
ed0e9702ae Adjusted signatures of DateTime and friends
* __wakeup is void -> void, see http://php.net/manual/en/language.oop5.magic.php#object.wakeup
* DateTime::__construct() does not accept null as time
* DateTimeZone::getLocation() has no last $object parameter
* ditto for DateTimeZone::getName()
* ditto for DateTimeZone::getTransitions()
2017-09-22 10:06:24 -04:00
Matt Brown
d949165eb6 Fix #217 - bad param count for DateTimeImmutable::getTimezone 2017-09-21 15:37:05 -04:00
Matt Brown
3bc497b18e Fix #217 - bad param count for DateTimeImmutable::getTimezone 2017-09-21 15:36:26 -04:00
François Kooman
8e35a72cc3 fix json_encode return values
`json_encode` can also return `false`
2017-09-18 16:14:01 -04:00
François Kooman
8a28ab4b26 Fix some cURL function return values (#208)
At least the functions referenced here can also return boolean
`false` according to the PHP manual. Add this information to the
CallMap file.
2017-09-10 21:49:51 -04:00
Matthew Brown
73694ab04e Suggest types when complaining of untype params
Ref #204
2017-09-02 18:15:52 -04:00
Matthew Brown
fb656f3575 Fix #203 and detect invalid countable count calls 2017-08-19 13:30:33 -04:00
Matt Brown
9a036cb4ab Fix resource signatures 2017-08-18 16:51:34 -04:00
Matthew Brown
e29dd140e3 Refactor scanning and analysis, introducing multithreading (#191)
* Add failing test

* Add visitor to soup up classlike references

* Move a whole bunch of code into the visitor

* Move some methods back, move onto analysis stage

* Use the getAliases method everywhere

* Fix refs

* Fix more refs

* Fix some tests

* Fix more tests

* Fix include tests

* Shift config class finding to project checker and fix bugs

* Fix a few more tests

* transition test to new syntax

* Remove var_dump

* Delete a bunch of code and fix mutation test

* Remove unnecessary visitation

* Transition to better mocked out file provider, breaking some cached statement loading

* Use different scheme for naming anonymous classes

* Fix anonymous class issues

* Refactor file/statement loading

* Add specific property types

* Fix mapped property assignment

* Improve how we deal with traits

* Fix trait checking

* Pass Psalm checks

* Add multi-process support

* Delay console output until the end

* Remove PHP 7 syntax

* Update file storage with classes

* Fix scanning individual files and add reflection return types

* Always turn XDebug off

* Add quicker method of getting method mutations

* Queue return types for crawling

* Interpret all strings as possible classes once we see a `get_class` call

* Check invalid return types again

* Fix template namespacing issues

* Default to class-insensitive file names for includes

* Don’t overwrite existing issues data

* Add var docblocks for scanning

* Add null check

* Fix loading of external classes in templates

* Only try to populate class when we haven’t yet seen it’s not a class

* Fix trait property accessibility

* Only ever improve docblock param type

* Make param replacement more robust

* Fix static const missing inferred type

* Fix a few more tests

* Register constant definitions

* Fix trait aliasing

* Skip constant type tests for now

* Fix linting issues

* Make sure caching is off for tests

* Remove unnecessary return

* Use emulative parser if on PHP 5.6

* Cache parser for faster first-time parse

* Fix constant resolution when scanning classes

* Remove test that’s beyond a practical scope

* Add back --diff support

* Add --help for --threads

* Remove unused vars
2017-07-25 16:11:02 -04:00
Matt Brown
e83ea3a5fe Fix #192 - correct SessionHandlerInterface::gc signature 2017-07-24 17:58:38 -04:00
Matthew Brown
86f2a9981c Fix #190 by updating callmap 2017-07-19 08:54:01 -04:00
Matt Brown
592194e9f2 Fix #187 by splitting abs into int and float versions 2017-07-14 18:09:25 -04:00
Matthew Brown
95de80b7f1 Make signature nullable 2017-06-30 14:16:27 -04:00
Matt Brown
d39aeb9c3d Fix casing in dom* classes 2017-06-29 12:10:07 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matt Brown
967e372e25 Update function signatures from Phan 2017-05-05 19:43:35 -04:00
Jon Ursenbach
ecee8df753 SimpleXMLElement::asXML returns a string|boolean. #145 2017-04-22 18:13:18 -04:00
Matt Brown
1c6934bfa8 Fix a couple more return types 2017-04-06 16:41:44 -04:00
Matt Brown
20b148d2d5 Fix preg_match return types 2017-04-06 15:48:52 -04:00
Matt Brown
fe54318432 Fix #119 - strtotime can return false 2017-03-30 11:02:59 -04:00
Matt Brown
8c9cba5e75 Fix #117 - update filesystem callmap functions 2017-03-16 17:34:40 -04:00
Scott
d1b0cdecd7 Add argument to apcu_add() definition 2017-03-01 19:39:19 -05:00
Matthew Brown
54026fc8f9 Touch up a couple of spots 2017-02-28 00:54:59 -05:00
Matthew Brown
2acfede1d2 Improve call map signatures from phan 2017-02-28 00:50:08 -05:00
Matthew Brown
9ffb9b64f1 Fix #106 - fix a few method signatures 2017-02-28 00:33:49 -05:00
Matthew Brown
59d1e63b5c Add possibly-false values to getFileName 2017-02-21 02:13:40 -05:00
Matthew Brown
870a4486a8 Fix socket return types 2017-02-17 19:52:37 -05:00
Matthew Brown
b1f7cfb08e Make file return type more specific 2017-02-12 12:22:10 -05:00
Matthew Brown
2a3c4ee63a Fix msg_receive byref params 2017-02-12 11:34:38 -05:00
Matthew Brown
66d98a023f Allow false return value 2017-02-08 22:45:18 -05:00
Matthew Brown
fe803129cf Fix #77 with correct range param 2017-01-29 00:24:55 -05:00
Matt Brown
86201e71b2 Make arguments of SplFileObject::fputcsv optional 2017-01-19 17:58:34 -05:00
Matthew Brown
3510757d89 Prevent potentially confusing output calculating array_keys 2017-01-19 00:52:02 -05:00
Matthew Brown
6b95b84577 Add DateTimeInterface methods 2017-01-15 20:08:13 -05:00
Matthew Brown
9746c8972f Fix MixedAssignment errors 2016-12-17 00:48:31 -05:00
Matt Brown
ee2a60499e Fix LimitIterator issue 2016-12-09 18:53:18 -05:00
Matt Brown
1bcd31dd33 Update CallMap from etsy/phan 2016-12-09 11:09:04 -05:00
Matthew Brown
7793f40803 Add Phan MIT license 2016-11-21 14:50:00 -05:00
Matthew Brown
0090179d78 Update to latest CallMap 2016-11-05 18:34:23 -04:00
Matthew Brown
41ab05987d Make second arg of trait_exists optional 2016-11-05 18:32:14 -04:00
Matthew Brown
c5107f2abf Fix zlib_encode 2016-10-26 11:57:30 -04:00
Matthew Brown
76191e2505 Add back apc_store proper signature 2016-10-26 11:25:44 -04:00
Matthew Brown
77c442cb1d Improve CallMap from origin 2016-10-26 11:16:37 -04:00
Matthew Brown
b0b767c465 Fix unnecessary Exception signatures 2016-10-26 10:25:52 -04:00
Matthew Brown
6dde59bd20 Fix previous exception 2016-10-24 19:20:42 -04:00
Matthew Brown
4d0d5fab9a Fix Exception type 2016-10-24 19:00:52 -04:00
Matthew Brown
3fa1cce4f6 Fix more callmap issues 2016-10-24 18:56:43 -04:00
Matthew Brown
09ab4b4f33 Fix casing of DateTime objects 2016-10-24 18:49:27 -04:00
Matthew Brown
357cd8ad41 Add support for Closure::__invoke 2016-10-24 15:55:05 -04:00
Matthew Brown
fbdfc78546 Fix references to moved fucntionality 2016-10-22 18:25:14 -04:00
Matthew Brown
ca3dfe6e39 Fix Psalm errors in Psalm 2016-10-15 00:12:57 -04:00
Matthew Brown
2b4b7c26e9 Add byref for getmxrr 2016-10-11 01:27:59 -04:00
Matthew Brown
6027687ad9 Fix callmap incorrect value 2016-09-15 16:29:58 -04:00
Matthew Brown
b8c5bc4968 proc_open can return false 2016-08-31 15:10:29 -04:00
Matthew Brown
274448d014 Fix casing of simplexml returns 2016-08-12 20:45:34 -04:00
Matthew Brown
f1fa5ca42f Add false vals referenced in https://github.com/etsy/phan/pull/316 2016-08-12 16:36:27 -04:00
Matthew Brown
300375c4bd Add preliminary call map 2016-08-10 19:37:40 -04:00