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

1049 Commits

Author SHA1 Message Date
Matthew Brown
1586cb249d Add protection for leaky assertions 2019-08-10 16:58:57 -04:00
Matthew Brown
034799773d Remove unused var 2019-08-10 14:45:43 -04:00
Matthew Brown
af0331c251 Fix #1997 - fix reconciliation of arrays and traversables 2019-08-10 14:39:14 -04:00
Matthew Brown
60c0133fff Break apart reconciler 2019-08-10 13:22:21 -04:00
Matthew Brown
3cf160cbe9 Separate out assertion negation reconciliation 2019-08-10 12:04:16 -04:00
Matthew Brown
3f78082720 Fix is_string call 2019-08-10 09:16:32 -04:00
Matthew Brown
460120ec45 Fix #1994 - make assert-if-true work for $this properties 2019-08-10 09:12:02 -04:00
Brown
5254b7501e Fix #1996 - detect unused variable in static property name 2019-08-09 12:55:47 -04:00
Gert de Pagter
5b2f54bbcb Allow setLocale to have 0 or null as parameters (#1993) 2019-08-09 08:41:28 -04:00
Matthew Brown
dec612a47e Remove blank line 2019-08-08 23:06:52 -04:00
Matthew Brown
53817ed40b Fix #1991 - allow overlapping code to subsume manipulations inside 2019-08-08 22:58:54 -04:00
Brown
cf53f5d825 Ignore spaces when array keys have $ at start 2019-08-08 18:01:08 -04:00
Brown
bdac01582d Fix #1989 - support fully-qualified params in @method annotations 2019-08-08 17:25:56 -04:00
Brown
d5e2c323d3 Add support for pure-ish instance methods 2019-08-08 14:17:34 -04:00
Matthew Brown
747782d258 Fix #1987 - avoid inferredType not being null 2019-08-07 22:41:26 -04:00
Brown
955899ade0 Builtin functions are assumed to be pure 2019-08-07 15:21:15 -04:00
Matthew Brown
50bd18c404 Fix #1985 - prevent complicatedExpressionException from breaking analysis 2019-08-06 22:58:53 -04:00
Brown
16a1dc8538 Fix errors 2019-08-06 18:56:36 -04:00
Brown
14b37b95af Fix potential recursion 2019-08-06 17:29:44 -04:00
Brown
fc8d2bd563 Do more taint creation for magic properties 2019-08-06 14:27:21 -04:00
Brown
37d93141c4 Only register taints on known magic properties 2019-08-06 13:05:34 -04:00
Brown
0dc6b74fb4 Add taintedness to magic property fetches 2019-08-06 12:54:12 -04:00
Brown
17753865f3 Add detection to mixed params 2019-08-06 10:33:21 -04:00
Matthew Brown
8f6d432dd0 Add support for magic property comprehension 2019-08-05 23:19:22 -04:00
Brown
6eb62591ab Specialise calls when functions are pure 2019-08-05 18:33:33 -04:00
Brown
87bf907c1e Fix echo checks 2019-08-05 10:21:23 -04:00
Matthew Brown
b2c0993cdc Add framework for taint analysis to Psalm
Ref #611
2019-08-04 10:37:36 -04:00
Matthew Brown
ea1f9874fb Remove more memory leaks 2019-08-02 01:55:24 -04:00
Brown
3a1a3ebc47 Fix #1980 - don’t complain about UnusedVariable after continue 2019-07-31 17:35:56 -04:00
Brown
c67e38aded Rename var to be more uniform 2019-07-31 17:14:00 -04:00
Matthew Brown
f718c2fca1 Fix #1974 - prevent bad property defaults on static properties 2019-07-29 22:18:46 -04:00
Matthew Brown
90854c4094 Fix broken behaviour when analysing interface test methods 2019-07-28 19:44:36 -04:00
Matthew Brown
f432cc0884 Fix #1846 - warn about missing interface return types 2019-07-28 19:03:12 -04:00
Matthew Brown
c356b579fd Prevent empty @template-extends docblock from being a fatal error
Fixes #1963
2019-07-28 16:47:06 -04:00
Matthew Brown
de932c4c18 Fix #1972 - improve understanding of how setcookie works 2019-07-28 16:40:35 -04:00
Matthew Brown
e58ade5803 Allow lower-cased constant names 2019-07-28 10:06:47 -04:00
Brown
8cb5d012d9 Check expressions in variable name static calls 2019-07-25 09:45:11 -04:00
Matthew Brown
2c89a97f91 Fix #1970 - make sure reconciled types are templated 2019-07-25 08:33:27 -04:00
Matthew Brown
5a4a133f50 Fix #1970 - allow comparison to templated param class 2019-07-24 22:13:51 -04:00
Brown
352f18b169 Register so it doesn’t get removed 2019-07-24 17:41:13 -04:00
Brown
5770a6c904 Add support for compact 2019-07-24 17:24:23 -04:00
Brown
ea2074b19b Allow suppression of unused variable issues 2019-07-24 17:01:41 -04:00
Brown
e22e0ac92c Fix unused ref in assign op
Fixes #1968
2019-07-24 16:53:14 -04:00
Jeffrey Yoo
ed61bcafda Issue 1926 unused variable (#1967)
* add support for Psalter to remove UnusedVariable

* fix issues found by Psalm

* fix stylistic issues found by phpcs

* added more stylistic changes and suppressed UndefinedClass error for Psalm

* suppress TypeDoesNotContainType error for CheckTrivialExprVisitor

* fix whitespace issue raised by phpcs

* fix bug where partial removal of assignment by ref does not process '&' symbol

* Remove workspace files

* remove 'Array_' and 'ArrayItem' classes from blacklist and add 'New_' class to the blacklist
2019-07-24 16:48:54 -04:00
Pavel Batečko
90d020d6fc Improve DOM extension types (#1965)
* Improve DOM extension types

* fixup! Improve DOM extension types
2019-07-23 22:53:31 -04:00
Matthew Brown
c76380174f Fix infinite recursion on property types 2019-07-22 23:54:33 -04:00
Brown
c283f0877d Analyse binary ops always 2019-07-22 18:04:52 -04:00
2e3s
f15cc7dd5b Mark private properties unused when referenced only in constructor (#1962)
* Mark private properties unused when referenced only in constructor

If a private property is used only in constructor then most likely
it's a dead code since there is no need to have the class property.
But such static properties can be accessed between the calls.

* Ignore the private property issue on alter

* Fix the related dead code psalm

* Add a missing condition into the test
2019-07-21 23:29:16 -04:00
Matthew Brown
3d4adee6b3 Reduce with / before converting back 2019-07-21 11:03:02 -04:00
Matthew Brown
76508e6d64 Improve behaviour of templated template assertions
Fixes #1956
2019-07-21 01:40:19 -04:00