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
Matt Brown
0304201d91
Fix #932 - allow obvious string vars to be used for includes
2018-08-07 13:17:23 -04:00
Bruce Weirdan
c1e21fcf5d
Update PHPUnit ( #888 )
...
* upgrade phpunit, test with low and high deps
* work around possibly-anonymous test cases introduced by newer PHPUnit
* Alternative TestCase::getName() nullability workaround
Previous workaround was failing due to PHP warnings on 7.1 or 7.2
(depending on specific signature). There's just no signature that would
be working for all 4 variants of (ver / dep) matrix.
* don't disable xdebug if it's not enabled
* allowed 7.0/high to fail until PHPUnit 6.5.10 is released
see sebastianbergmann/phpunit#3209
2018-07-13 17:44:50 -04:00
Matt Brown
4f9d4b7094
Fix #885 - allow suppression of UndefinedMethod at method level
2018-07-12 12:12:28 -04:00
Matt Brown
e10b2c0fd4
Fix #805 - allow dead code detection from methods just called internally
2018-06-19 16:14:51 -04:00
Matthew Brown
3670f066bb
Improve dead code detection
2018-06-16 20:01:41 -04:00
Matthew Brown
d47980df13
Fix #416 - make sure trait methods are treated better by dead code detection
2018-06-09 23:10:42 -04:00
Matt Brown
4bf652863b
Also check for non-false returns on LessSpecificReturnType
2018-03-07 11:16:56 -05:00
Matt Brown
80864b1ce8
Don’t be concerned about unused params named $_
...
Fixes #540
2018-02-27 11:39:26 -05:00
Matt Brown
1f358e36ef
Fix #544 - remove possibly assigned try vars from catch initialisations
2018-02-27 11:25:27 -05:00
Matthew Brown
115e647c3c
Fix #543 - register static vars properly so their references can be caught
2018-02-26 19:32:26 -05:00
Matthew Brown
956972b4a4
Fix #539 - evaluate global variable usage
2018-02-25 10:43:54 -05:00
Matthew Brown
81fd016120
Fix #193 - allow caching of storages
2018-02-19 00:27:39 -05:00
Matthew Brown
108ca54867
Fix #516 - make sure --find-references-to doesn’t output missing references
2018-02-17 17:45:30 -05:00
Matthew Brown
a0e88cb16f
Fix #518 - improve dead code detection to cover variable method calls
2018-02-17 17:23:57 -05:00
Matthew Brown
c87204acbf
Don’t check for unused vars when checking for initialiasations
...
Fixes #517
2018-02-17 12:02:31 -05:00
Matthew Brown
8e0998e081
Break apart the Codebase class
2018-02-03 18:56:54 -05:00
Matt Brown
4099bf24ce
Make sure new $class args are always evaluated
2018-01-29 12:22:50 -05:00
Matt Brown
66c8637b5b
Fix unused code checks for possibly undefined vars
2018-01-29 12:13:44 -05:00
Matthew Brown
c4be89bf37
Validate docs by running code through them
2018-01-28 23:41:11 -05:00
Matthew Brown
ed5245bc47
Go easy on unknown invocations
2018-01-28 18:13:38 -05:00
Matthew Brown
44b8b22995
Improve checks for unused variables and params
2018-01-28 17:28:34 -05:00
Matthew Brown
ea28ee709d
Improve unused variable detection slightly
2018-01-25 01:04:26 -05:00