Matthew Brown
b2678d40aa
Revert "Fix #2909 - don’t treat args of unknown calls as possible by-reference vars"
...
This reverts commit 105fe012c4
.
2020-03-05 21:10:29 -05:00
Matthew Brown
105fe012c4
Fix #2909 - don’t treat args of unknown calls as possible by-reference vars
2020-03-04 23:49:06 -05:00
Matthew Brown
25e7039f02
The current method is used
...
Fixes #2540
2020-01-01 18:33:12 -05:00
Matthew Brown
02fd1659ef
Ignore serialize/unserialize methods
...
Fixes #2511
2019-12-31 07:56:35 -05:00
Brown
e551b24843
Classes that just reference themselves aren’t used
2019-12-16 11:46:10 -05:00
Brown
e476eed111
Fix issue where inside_conditional is forgotten
2019-12-11 12:06:10 -05:00
Brown
4b715cdbff
Fix #2456 - ignore UnusedFunctionCall when function asserts
2019-12-11 10:13:22 -05:00
Brown
821f3528d2
Fix #701 - indicate issues fixable with Psalter
2019-12-02 15:24:01 -05:00
Matthew Brown
deb36e8b27
Allow array_map alone when it uses a closure
2019-09-09 21:28:56 -04:00
Brown
a6baa2d04c
Allow callables to be understood as pure
...
Fixes #2112
2019-09-09 12:11:04 -04:00
Brown
de5df1e36a
Warn about unnecessary use of DateTimeImmutable
2019-09-03 13:49:15 -04:00
Matthew Brown
4a38ab165f
Fix erroneous marking of external-mutation-free method as unused
2019-08-31 10:02:11 -04:00
Matthew Brown
7886d5a408
Add support for @psalm-mutation-free annotation on methods
2019-08-31 00:47:12 -04:00
Matthew Brown
504ccdab8c
$a++, $a-- etc should be treated as assignments
2019-08-30 18:06:45 -04:00
Matthew Brown
d891217a48
Don’t complain about initialisation of external-mutation-free classes from pure context
2019-08-30 17:34:58 -04:00
Matthew Brown
bbde2d6239
Add support for @psalm-external-mutation-free
2019-08-30 17:26:55 -04:00
Matthew Brown
6d07663d70
Annotate method getters more accurately
2019-08-30 16:40:32 -04:00
Matthew Brown
f4f4a32f08
Fix #2062 - treat function inside variable method call name as used
2019-08-26 00:47:46 -04:00
Brown
f00ee740c0
Analyse encapsulated string when method not known
...
Ref #2052
2019-08-23 10:59:59 -04:00
Matthew Brown
5a1604d088
Fix #2047 - left side of callable is a thing that is also kinda called
2019-08-22 22:06:22 -04:00
Thomas Bley
149402abda
Extend impure functions ( #2042 )
...
* extended impure functions, fixes #2038
* extended UnusedCodeTest #2038
2019-08-21 13:12:13 -04:00
Matthew Brown
6ea68e9f7f
Clean up more unused @psalm-suppress annotations
2019-08-18 16:59:56 -04:00
Matthew Brown
5d94e340ee
Remove unused suppressions in tests
2019-08-18 15:34:32 -04:00
Brown
6a213a60aa
Make test name align with tested thing
2019-07-31 17:42:01 -04:00
Brown
3a1a3ebc47
Fix #1980 - don’t complain about UnusedVariable after continue
2019-07-31 17:35:56 -04:00
Matthew Brown
c887d907e3
Add missing return type
2019-07-28 20:42:35 -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
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Brown
c4eb127f11
Fix treatment of class_exists
2019-06-27 10:17:11 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
3a52ccd5a6
Add tests for things that should work
2019-06-25 21:46:18 -04:00
Matthew Brown
c4551bd0df
Fix issue where extension_loaded stopped constructor being recognised
2019-06-15 18:49:58 -04:00
Brown
0bd4dbcbc4
Bump to PHP 7.1
...
Fixes #1650
2019-05-16 18:36:36 -04:00
Matthew Brown
f33745ad25
Fix parameter offset for error
2019-05-13 16:01:41 -04:00
Brown
08bf101f48
Fix #1598 , catching unused variables followed by try inside loop
2019-05-02 17:21:02 -04:00
Brown
1eabe6ed55
Ignore protected properties redefined downstream
2019-04-17 16:55:15 -04:00
Brown
86c6b6fa36
Don’t warn about unused properties that override a used one
2019-04-17 16:41:35 -04:00
Brown
a529f74473
Add support for tracking callables
2019-04-17 15:45:40 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Bruce Weirdan
ec85096c96
Fixed identified issues
2019-03-02 08:43:19 -05:00
Matthew Brown
3d4710c9d3
Add better checks for invalid array_map/array_filter args
2019-02-22 00:50:41 -05:00
Brown
3deea3980d
Add checks for unitialized properties
...
Fixes #1328
2019-02-13 13:32:19 -05:00
Matthew Brown
a6755cc523
Fix default test versions to 7.3
2019-02-07 15:27:43 -05:00
Matthew Brown
17541b415f
Fix #1191 - allow Psalm to check against different versions of PHP
2019-02-07 12:25:57 -05:00
Matthew Brown
b43a6a31f1
Enable casing plugin and fix issues it found
2019-01-12 10:52:23 -05:00
Brown
341cb0c82c
Fix #1125 - check protected method overridden ids for use
2018-12-13 17:20:29 -05:00
Brown
110ca66692
Namespace test providers under Internal cc @TysonAndre
2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93
Change _checker to _analyzer
2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00
Brown
d0bd10d143
Improve provider architecture, upping test coverage
2018-09-30 11:34:51 -04:00