orklah
ae193ca4da
replace elvis operator by coalesce operator when applicable
2021-10-13 20:16:06 +02:00
orklah
c6fb81007c
Merge pull request #6629 from orklah/loops-tweaking
...
tweaking with loops
2021-10-11 20:45:54 +02:00
orklah
df34daee52
more consistency
2021-10-10 00:51:47 +02:00
orklah
870ee4ff93
->args to ->getArgs
2021-10-09 23:37:04 +02:00
orklah
38dac34846
unnecessary null initialization
2021-09-26 23:34:32 +02:00
orklah
72eab30a3a
coalesce operator
2021-09-26 23:34:31 +02:00
orklah
46801c4b98
clearer string operations
2021-09-26 23:34:31 +02:00
orklah
ae1afd90c6
coalesce operator
2021-09-26 22:37:17 +02:00
orklah
b194291bb3
try to fix offsets
2021-08-07 00:08:19 +02:00
orklah
006088d578
don't flag UnusedForeachValue as fixable
2021-08-03 18:24:53 +02:00
orklah
79d0647d19
fix issue when setting a value to a global is considered unused
2021-07-17 22:00:54 +02:00
Bruce Weirdan
e552925af6
Emit separate type of issue when foreach value is unused ( #5932 )
...
* Emit separate type of issue when foreach value is unused
Fixes vimeo/psalm#5929
* Fixed var name case sensitivity
2021-06-17 00:40:24 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Bruce Weirdan
e3d73a3166
Allow suppressing thrown interfaces and their descendants ( #5178 )
...
Fixes vimeo/psalm#5177
2021-02-07 21:08:29 -05:00
orklah
f9fccb2b2d
implement DTO for plugins ( #4881 )
...
* implement DTO for plugins
* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
Lukas Bestle
245a331be3
Full support for $this
in @var
annotations ( #4922 )
...
Fixes #4916 .
2021-01-03 01:44:35 +00:00
Matt Brown
1a629ccc82
Fix a few issues
2020-12-01 18:26:15 -05:00
orklah
d59ad152a0
Remove fixable flag for Complexity issues ( #4742 )
2020-11-30 08:43:18 -05:00
Matt Brown
b717356f95
Simplify more things
2020-11-27 17:48:39 -05:00
Matt Brown
ffabce19c5
Add complex issue error
2020-11-27 17:02:37 -05:00
Matt Brown
6db8132b4c
Simplify call analysers a bit
...
Ref #4714
2020-11-27 16:31:10 -05:00
Matt Brown
bf696bf82e
Add complexity function name echoing
2020-11-27 05:28:55 -05:00
Matt Brown
4c1cf37d52
Improve error message for UnusedVariable
2020-11-13 12:36:17 -05:00
Matt Brown
165e0db157
Fix style
2020-11-10 16:19:24 -05:00
Matt Brown
b731b53d5e
Add debug stuff for code complexity
2020-11-10 12:49:42 -05:00
Matt Brown
3359e7699a
Rename IfAnalyzer
2020-11-06 20:51:14 -05:00
Matt Brown
3bde327f1b
Break up CommentAnalyzer
2020-11-04 23:25:08 -05:00
orklah
ceaaa39ec3
improve phpdoc ( #4352 )
2020-10-17 12:36:44 -04:00
orklah
ffe7874906
Misc improvements ( #4314 )
...
* extract the operation out of the loop when possible
* remove unnecessary interfaces when already inherited in parent
* simplify expressions
* avoid using alias functions
* redundant phpdoc
* unused imports
2020-10-15 13:23:35 -04:00
Matt Brown
724b25b918
Change control_flow_graph to data_flow_graph
2020-10-13 17:28:12 -04:00
Matt Brown
516141a380
Rename ControlFlowGraph to more appropriate DataFlowGraph
2020-10-13 16:49:03 -04:00
Matt Brown
14efde286f
4.x - refactor unused variable detection
...
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
2020-09-30 12:28:13 -04:00
Brown
da65a4327f
Move taint graph functionality into its own object
2020-09-25 00:37:40 -04:00
orklah
37a2f8a33d
unused use statements ( #4228 )
2020-09-22 01:10:46 -04:00
Brown
56cddd16bf
Rename TaintGraph to ControlFlowGraph because it’s about to do more
2020-09-20 23:59:52 -04:00
Brown
70b8c8c0e4
Revert StatementsAnalyzer change
2020-09-20 21:01:59 -04:00
Brown
ef612ea598
Fix tests
2020-09-20 20:58:34 -04:00
Brown
0f6a271858
Improve file-based suppression of taints
2020-09-20 19:37:25 -04:00
Brown
5c23a3d7b3
Localise taint analysis better
2020-09-20 19:26:49 -04:00
Brown
2968b3b065
Add to StatementsAnalyzer taint object instead of Context
2020-09-20 18:42:21 -04:00
orklah
cb7065ae07
replace deprecated methods with their equivalent ( #4217 )
2020-09-20 08:56:49 -04:00
Brown
249903e18a
Fix style issues
2020-09-13 21:45:07 -04:00
Bruce Weirdan
689027c92d
Support multiple issue types in @psalm-suppress
( #4179 )
...
* Accept multiple issue names in `@psalm-suppress`
Fixes vimeo/psalm#1575
* Accept multiple issue types on statement docblocks as well
* Proper highlighting of individual issues in compound suppressions
2020-09-13 16:41:14 -04:00
orklah
da47588f91
replace return;
by return null;
in every non-void method, add return null;
when mising, add return types, remove redundant phpdoc ( #4176 )
2020-09-13 16:39:06 -04:00
Brown
ded9237176
Fix bad error flagging
2020-09-13 16:38:32 -04:00
Brown
9ed09d2679
Fix #4127 - improve error message for unused closure var
2020-09-12 17:03:11 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types ( #4137 )
...
* add native param types
* redundant phpdoc
* add more param types and adds "?" to nullable types
* remove redundant phpdoc
* add more param types and remove redundant phpdoc
* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
orklah
73f6fcde48
Short list syntax ( #4102 )
...
* Short list syntax
* revert unrelated CS
2020-09-02 00:17:41 -04:00