ec23f998ea
Finalize all internal classes
2023-10-26 17:00:29 +02:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -06:00
2f5d0a4a9f
Fix #8923
2022-12-18 18:19:22 +01:00
Jack Worman
69658e8315
SlevomatCodingStandard.Commenting.DocCommentSpacing
2022-12-14 13:34:41 -06:00
Jack Worman
36fa162d6d
Use php-cs-fixer to clean up docblocks
2022-12-13 20:46:43 -06:00
cca276768e
List refactoring v5 ( #8820 )
...
* Squash
* Remove BC break
* Suppress
* Possibly fix
* Fixes
* Fix test
* Trigger build
* Update psl
* Update psl
* Fixes
* Fixes
* Cleanup
* fix
* Fix build
* Do not consider never when getting the max count
* Add assertion
* Cleanup
* Fix
* Cleanup
2022-12-13 21:40:19 +01:00
orklah
2490230f1f
fix missing break handling in loop
2022-12-04 13:57:59 +01:00
kkmuffme
694b7d8975
check "never" return type more strictly
...
* require explicit "never" return type when function always exits, except if it only throws
* error if function does not exit, but return type explicitly contains "never"
* Fix: https://github.com/vimeo/psalm/issues/8175
* Fix: https://github.com/vimeo/psalm/issues/8178
2022-12-01 14:51:58 +01:00
Bruce Weirdan
58e87fa5e0
Applied ArraySpreadInsteadOfArrayMergeRector (take 2)
2022-07-29 18:17:21 -04:00
Aleksandr Zhuravlev
b4fdc3e326
Made most of callbacks static. Reworked some array_map() into foreach()
2022-04-09 21:58:26 +12:00
Matthew Brown
5575fa1e32
Remove unnecessary method
2022-02-09 12:18:15 -05:00
orklah
d2faa5b94f
fix errors after merge
2022-01-14 21:13:34 +01:00
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00
orklah
cbb0c6398f
allow short closure with never
2022-01-06 21:36:34 +01:00
Bruce Weirdan
8726065d21
Applied ClosureToArrowFunctionRector
2022-01-06 00:48:04 +02:00
orklah
b658b2738f
remove exitFunctions
2022-01-02 15:20:01 +02:00
Matthew Brown
8daf9c42a9
Remove useless chunk of code in ScopeAnalyzer
2021-12-07 23:42:17 -05:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
sasezaki
5a01c8d601
Added phpcs SelfMemberReference rule, and applied
2021-11-07 15:47:39 +09:00
orklah
bee5b69f7f
use Attribute feature of PHP-Parser to avoid dealing with dynamic properties
2021-10-13 13:27:56 +02:00
orklah
d5eb471688
every condition must be true
2021-10-10 10:27:22 +02:00
orklah
85668ed255
Add support for infinite for loops
2021-10-10 10:22:41 +02:00
orklah
97e91e6bf0
code trimming
2021-09-25 02:34:21 +02:00
orklah
f9b37cea5b
name error
2021-09-04 14:08:04 +02:00
orklah
c8cf503367
introduce isAlwaysFalsy and isAlwaysTruthy
2021-09-04 13:56:13 +02:00
orklah
e99c1951ae
Make Psalm understand infinite while loop in control actions
2021-09-02 22:28:01 +02:00
orklah
9ff0fceb71
CS changes
2021-07-20 23:41:11 +02:00
orklah
acfdb82856
Basic implementation
2021-07-20 23:34:38 +02:00
Matthew Brown
0a7d254689
Fix #5911 - improve non-terminating switch type inference
2021-06-09 09:06:23 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
3c43bc1522
Fix #5789 - prevent incorrect return type inference when all cases return
2021-05-18 08:52:41 -04:00
Matt Brown
9eda9f9bbf
Fix cs
2021-05-17 19:44:55 -04:00
Matt Brown
21456f51e6
Only call ScopeAnalyzer once on whole function body
2021-05-17 18:52:25 -04:00
Matt Brown
836587ec1d
Fix combination of end states with never
2021-05-17 12:35:27 -05:00
Matt Brown
9635ca620c
Correctly interpret continue 2 in nested loops
2021-05-17 08:26:38 -05:00
Matt Brown
f6bdeb6234
Fix switch-with-continue bug
2021-05-17 07:27:58 -05:00
Bruce Weirdan
9e19653a72
Infer never
return type ( #5710 )
...
* Allow __toString to return never
Fixes vimeo/psalm#5653
* Push $return_is_exit down
* Produce unique control actions
* Test suggesting `@return never`
2021-05-05 01:22:29 -04:00
orklah
09fb141e49
Document lowercase-string when possible ( #4904 )
...
* document lowercase-string
* fix missing strtolower
2020-12-29 11:42:12 +00:00
Matt Brown
ff3fff56d4
Simplify assertion negations, centralising as much as possible
...
Now the flag passed to scrapeAssertions just determines the errors emitted
2020-11-19 14:32:49 -05:00
Matt Brown
8d2e88ef41
Fix #4333 - don’t get tripped up on try with no catches
2020-10-15 10:15:55 -04:00
Matt Brown
d8d17a6587
Fix #4327 - make sure loop always returns
2020-10-14 20:19:55 -04:00
orklah
62e79fb7ea
param types ( #4313 )
2020-10-12 15:46:47 -04:00
orklah
10f2966dcb
return types ( #4311 )
...
* return types
* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Brown
c17bacd682
Prevent duplicate switch return types
2020-09-25 09:45:20 -04:00
Brown
3e0f449163
Detect more issues inside finally block
2020-09-21 15:16:19 -04:00
Brown
7bd1c43be1
Don’t forget control actions
2020-09-21 11:18:30 -04:00
orklah
1a1b88bb5e
add visibilities to constants ( #4219 )
2020-09-20 12:54:46 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
f0a5bd74b6
Detect never-return statement same as a throw
2020-05-26 15:02:23 -04:00
Matthew Brown
5f7730c12e
Add slash
2020-01-27 12:26:06 -05:00