1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

111 Commits

Author SHA1 Message Date
Jack Worman
1c19260cdd Require trailing commas 2022-12-18 13:20:31 -06:00
Jack Worman
2f677f600b CS fixes 2022-12-17 08:13:32 -06:00
Jack Worman
30a8f71958 Remove useless ifs 2022-12-16 22:00:34 -06:00
d0be59e16e
Immutable unions (#8627)
* Immutable CodeLocation

* Remove excess clones

* Remove external clones

* Remove leftover clones

* Fix final clone issue

* Immutable storages

* Refactoring

* Fixes

* Fixes

* Fix

* Fix

* Fixes

* Simplify

* Fixes

* Fix

* Fixes

* Update

* Fix

* Cache global types

* Fix

* Update

* Update

* Fixes

* Fixes

* Refactor

* Fixes

* Fix

* Fix

* More caching

* Fix

* Fix

* Update

* Update

* Fix

* Fixes

* Update

* Refactor

* Update

* Fixes

* Break one more test

* Fix

* FIx

* Fix

* Fix

* Fix

* Fix

* Improve performance and readability

* Equivalent logic

* Fixes

* Revert

* Revert "Revert"

This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.

* Fix

* Fix reference bug

* Make default TypeVisitor immutable

* Bugfix

* Remove clones

* Partial refactoring

* Refactoring

* Fixes

* Fix

* Fixes

* Fixes

* cs-fix

* Fix final bugs

* Add test

* Misc fixes

* Update

* Fixes

* Experiment with removing different property

* revert "Experiment with removing different property"

This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.

* Uniform naming

* Uniform naming

* Hack hotfix

* Clean up $_FILES ref #8621

* Undo hack, try fixing properly

* Helper method

* Remove redundant call

* Partially fix bugs

* Cleanup

* Change defaults

* Fix bug

* Fix (?, hope this doesn't break anything else)

* cs-fix

* Review fixes

* Bugfix

* Bugfix

* Improve logic

* Update
2022-11-04 19:04:23 +01:00
orklah
f9e392316f remove unused imports 2022-01-21 00:17:06 +01:00
Bruce Weirdan
8726065d21
Applied ClosureToArrowFunctionRector 2022-01-06 00:48:04 +02:00
Bruce Weirdan
5758d31161
Apply literal number separator rector
I opted for customary 3-digit groups, except version id, where 2-digit
groups are used to match the version id encoding.
2022-01-05 01:00:05 +02:00
Bruce Weirdan
afa6497051
Dropped THtmlEscapedString 2022-01-03 22:48:59 +02:00
Bruce Weirdan
b54ab67c76
Require @internal annotation on Psalm\Internal symbols 2022-01-03 09:33:22 +02:00
orklah
8d6b781b3e
use consistent way to compare php version 2022-01-02 13:35:43 +02:00
orklah
094ffb36f9 phpdoc issues 2021-12-27 22:30:10 +01:00
orklah
65fffd2116 replace fully qualified names by imports 2021-12-27 22:30:10 +01:00
ralila
6ee3d44092 Conversion of misc 2021-12-14 02:52:44 +01:00
ralila
19b2a64ce8 Conversion of Psalm\Internal\Analyzer\**\*Analyzer 2021-12-14 02:31:26 +01:00
rarila
1c298c4605 Conversion of Psalm\Type 2021-12-14 02:31:22 +01:00
ralila
e32af3c05a Conversion of Psalm\Type\Atomic 2021-12-14 02:26:28 +01:00
ralila
8fb2e0f885 Handle some partials 2021-12-04 21:55:53 +01:00
elnoro
73f7ad9dd3
Changed confusing comments and docblocks (#5931) 2021-06-14 08:45:38 -04:00
Matt Brown
0f5b117534 Migrate ClassLikeName options to object 2021-04-30 15:01:33 -04:00
Samuel Mortenson
4aabb411a8
Added event to prevent tainting. (#5398)
* Added event to prevent tainting.

* Remove optional codebase parameter.

* Removed falsy check for codebase.

* Use two separate hooks for adding and removing taints

* Add slashes

* Update add/remove taint test name.

* Cleaned up SafeArrayKeyChecker example plugin.

* Added more AddRemoveTaintsEvent calls to codebase.

* Fix type check error with $added_taints param.

* Added AddRemoveTaintsEvent to remaining classes.

* Fix post-merge error.

* Add comma

* Remove $int_offset that never existed

Co-authored-by: Matt Brown <github@muglug.com>
2021-03-19 22:41:41 -04:00
orklah
5191dac3fa
Introduce Virtual Nodes in order to differentiate real nodes in plugins (#5222) 2021-02-15 16:18:41 -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
orklah
8974da5610
preserve analyzers until the end of file (#4834)
* preserve analyzers until the end of file

* remove unused variable
2020-12-13 01:17:13 -05:00
Matt Brown
4488d5fb1f Use more accurate arguments count 2020-10-14 18:51:15 -04:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
ea47548dd0 4.x - Prevent AfterFunctionCallAnalysisInterface from rewriting return types 2020-10-04 23:39:20 -04:00
orklah
37a2f8a33d
unused use statements (#4228) 2020-09-22 01:10:46 -04:00
orklah
b19f0a7034
Remove empty() and use strict comparison when safe (#4211)
* replace empty usage with stricter checks

* use strict comparison when safe

* replace is_null with === null for consistency
2020-09-19 18:26:51 -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
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
73f6fcde48
Short list syntax (#4102)
* Short list syntax

* revert unrelated CS
2020-09-02 00:17:41 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Matthew Brown
50cc3a8afa Align paramter names 2020-08-09 23:19:59 -04:00
Matthew Brown
73321339a3 Bump nikic/php-parser 2020-08-09 16:23:43 -04:00
jarstelfox
20ab8ee736
Casing checker: Ignore call / call static (#3939) 2020-08-05 15:48:41 -04:00
jarstelfox
ac5823095d
TemplateChecker: Ensure it's working again (#3724)
* TemplateChecker: Ensure it's working again

The template checker is erroring on my first template file due to storage missing on my pseudo method. I traced back to your original + noticed the optional param had been removed.

* TemplateChecker: Add missing use
2020-07-01 09:01:25 -04:00
Brown
30907f0269 Clean up comment parsing 2020-05-28 22:14:41 -04:00
Brown
111303d913 Add non-empty-lowercase-string type 2020-05-15 10:18:05 -04:00
Brown
0fc3398631 Move parsing methods into internal namespace 2020-05-13 19:12:45 -04:00
Brown
8f57d0c738 Fix #3204 - normalise function ids where possible 2020-04-20 21:38:35 -04:00
Brown
72104a52ad Improve file invalidation when using --diff mode 2020-04-02 17:18:04 -04:00
Brown
971ae50bea Do prep work for #3024 - improve handling of absent class references 2020-03-26 12:35:27 -04:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Brown
f141f7c526 Improve --diff checks by including trait-using classes in dependents 2020-02-11 16:39:33 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Brown
1f07ea7ee7 Tighten up Psalm’s inference 2019-11-25 15:20:31 -05:00
Brown
1add42b691 Fix switch handling 2019-11-25 11:51:34 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -04:00