1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 18:36:58 +01:00
Commit Graph

1703 Commits

Author SHA1 Message Date
Matthew Brown
4a03c4aedd Fix impossible isset checks 2020-01-14 21:54:02 -05:00
Matthew Brown
c3edbdbc19 Allow checking $_SESSION for null without altering type 2020-01-14 21:51:04 -05:00
Matthew Brown
1202ba45ef
Fix blank line 2020-01-14 18:51:46 -05:00
Brown
df8f2085f0 Change constant type to be more forgiving 2020-01-14 18:39:15 -05:00
Brown
de7a870509 Add better mixed check 2020-01-14 18:38:02 -05:00
Brown
0f6b61d62d Clone isset type before contradicting 2020-01-14 18:28:32 -05:00
Brown
3fd70a9c88 Only set if non-null 2020-01-14 17:03:58 -05:00
Brown
adc658901a Improve inference of constant() calls 2020-01-14 16:56:09 -05:00
orklah
b09869b7c6 callmap changes (#2612)
* set_error_handler return the same type as its param

* a constant can only have scalars, array of scalars or null

* a constant can only have scalars, array of scalars or null
2020-01-14 16:55:25 -05:00
Brown
1ccababcb7 Track list-ness of constant arrays
Fixes #2621
2020-01-14 12:13:41 -05:00
Brown
c79a8ecbc2 Fix dumb 2020-01-14 10:55:07 -05:00
Brown
fcc7d896a0 Commit actual fix 2020-01-14 10:53:54 -05:00
Matthew Brown
42073a800a Remove unevaluated code 2020-01-14 00:55:56 -05:00
Matthew Brown
e1daf26202 Improve support for null coalesce checks 2020-01-14 00:53:38 -05:00
Matthew Brown
b0073d4558 Fix #2614 - prevent isset($string) 2020-01-13 21:27:09 -05:00
Matthew Brown
ef3c2d30c9 Fix #2613 - allow docblock-defined object-like as non-empty-array 2020-01-13 21:05:30 -05:00
Brown
5d15ef062e Fix phpcs 2020-01-13 17:28:00 -05:00
Brown
6c771e5dd3 Prevent crashes under PHP 7.3 on macs in Language server mode 2020-01-13 16:50:09 -05:00
Brown
eb7c3dcc11 Fix #2611 - fix combination of inferred closure return types 2020-01-13 10:23:58 -05:00
Tyson Andre
7a65eb1da9 Fix required parameter after optional in Psalm (#2609)
Psalm supports php 7.1 at minimum, so this is no longer necessary.
2020-01-12 12:46:08 -05:00
Тальгат Хайруллов
39a822759d #2579 TooManyArguments was triggered if the variadic function declared at the autoloader file. Fixed. (#2580) 2020-01-12 11:33:38 -05:00
Mark A. Hershberger
fbc2c21c9b bug: #2103 -- throw error if directories are given instead of file (#2605)
* bug: #2103 -- throw error if directories are given instead of file

* use global is_dir
2020-01-12 10:53:12 -05:00
SignpostMarv
9b2ceba2db removing trailing comma in function call, not detectable by php-cs-fixer re: FriendsOfPHP/PHP-CS-Fixer#4135 (#2597) 2020-01-11 16:00:38 -05:00
Matthew Brown
39f0def7bf Add null check 2020-01-11 15:59:28 -05:00
Matthew Brown
131fb97663 Fix #2594 - forbid isset check on null 2020-01-11 15:58:40 -05:00
Matthew Brown
7b887efc2c Fix #2547 - use better conditional check 2020-01-11 12:33:58 -05:00
Matthew Brown
bd846123ce Fix #2560 - handle special case of array_filter on single-element array 2020-01-11 11:54:29 -05:00
Matthew Brown
40406c7ff0 Fix #2576 - remove literal key values if array_filter has no args 2020-01-11 11:48:22 -05:00
Matthew Brown
85966d8a21 Fix #2577 - fix list cast to array 2020-01-11 11:42:09 -05:00
Matthew Brown
2ae85f7c8b Fix #2593 - don’t crash with bad @param-out annotation 2020-01-11 10:47:31 -05:00
Brown
5ddcab1003 Fix subtraction of string from numeric 2020-01-10 18:05:45 -05:00
Brown
df8e3845e5 Fix #2590 - allow null argument for DateTime when no second arg passed 2020-01-10 15:53:15 -05:00
Brown
2c7197ab4b Fix #2578 - improve inference of functions beginning with assert 2020-01-09 15:45:17 -05:00
Brown
bd9142f131 Fix #2574 - remove assertions after increment 2020-01-09 11:51:56 -05:00
Matthew Brown
bd7f342491 Add constant definitions 2020-01-08 23:48:42 -05:00
Brown
55bf6333af Fix addition of Psalm classes 2020-01-08 17:47:30 -05:00
Brown
eb7a8ae8d2 Fix sorting 2020-01-08 17:43:49 -05:00
Brown
6b43c41ea3 Add file-defined functions 2020-01-08 17:40:50 -05:00
Brown
7482b9e56f Emit all stubs discovered by Psalm during analysis
Fixes #827
2020-01-08 17:23:40 -05:00
Matthew Brown
146dd461ef Fix #2569 - improve template return type checks 2020-01-07 21:08:13 -05:00
Brown
adfb488986 Fix #2565 - prevent infinite recursion when analysing file with @mixin annotations that reference each other 2020-01-07 17:06:44 -05:00
Brown
55aceb2b6d Add if 2020-01-07 13:18:24 -05:00
Brown
024ec38aa1 Fix #2567 - still remap params in some circumstances 2020-01-07 13:01:16 -05:00
Pavel Batečko
702ca34c41 Improve array function types (#2566)
* Improve sorting function out types

* Improve return types of array_diff_assoc(), array_intersect_assoc()

* Fix versionCompareAsCallable test
2020-01-07 11:40:23 -05:00
Matthew Brown
90d6b73fd8 Fix taint analysis of binary operations 2020-01-07 08:50:31 -05:00
Matthew Brown
8f3d325bbc Fix comparison 2020-01-07 02:24:21 -05:00
Matthew Brown
1f777bec0e Capture non-empty-string from concat more effectively 2020-01-07 01:44:12 -05:00
Matthew Brown
ce5917c6fb Add better string detection 2020-01-07 01:21:29 -05:00
Matthew Brown
b351df0483 Fix typo 2020-01-07 01:06:51 -05:00
Matthew Brown
2cd7f74efb Fix #2554 - treat templated class string as proper subtype of class string 2020-01-07 00:39:16 -05:00