Bruce Weirdan
3c4a829f71
Fixed more CS issues
2023-02-07 11:20:02 -04:00
Matthew Brown
d450b40da8
Remove some logic that didn't need to be there ( #9209 )
...
* Remove check to see what breaks
* Simplify following logic
* Add tests from @kkmuffme‘s branch
* Reduce scope of fix
* Clean up logic a little
* Add failing test
* Improvements
* Fix for non-Paradoxical Condition result
2023-02-03 21:08:16 -05:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -06:00
Jack Worman
643542346b
Add codesniffer rules and expand php-cs-fixer to bin and test
2022-12-14 13:29:09 -06:00
1986c8b4a8
Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists ( #8395 )
...
* 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
* Add support for list{} and callable-list{} types, properly implement array_is_list assertions (fixes #8389 )
* Default to sealed arrays
* Fix array_merge bug
* Fixes
* Fix
* Sealed type checks
* Properly infer properties-of and get_object_vars on final classes
* Fix array_map zipping
* Fix tests
* Fixes
* Fixes
* Fix more stuff
* Recursively resolve type aliases
* Fix typo
* Fixes
* Fix array_is_list assertion on keyed array
* Add BC docs
* Fixes
* fix
* Update
* Update
* Update
* Update
* Seal arrays with count assertions
* Fix #8528
* Fix
* Update
* Improve sealed array foreach logic
* get_object_vars on template properties
* Fix sealed array assertion reconciler logic
* Improved reconciler
* Add tests
* Single source of truth for test types
* Fix tests
* Fixup tests
* Fixup tests
* Fixup tests
* Update
* Fix tests
* Fix tests
* Final fixes
* Fixes
* Use list syntax only when needed
* Fix tests
* Cs-fix
* Update docs
* Update docs
* Update docs
* Update docs
* Update docs
* Document missing types
* Update docs
* Improve class-string-map docs
* Update
* Update
* I love working on psalm :)
* Keep arrays unsealed by default
* Fixup tests
* Fix syntax mistake
* cs-fix
* Fix typo
* Re-import missing types
* Keep strict types only in return types
* argc/argv fixes
* argc/argv fixes
* Fix test
* Comment-out valinor code, pinging @romm pls merge https://github.com/CuyZ/Valinor/pull/246 so we can add valinor to the psalm docs :)
2022-11-05 22:34:42 +01:00
24f7920e9a
Fix if propagation ( #8326 )
...
* Add failing unit test
* Fix test
* Revert "Add comment for skipped test"
This reverts commit e4f73beb08
.
* Revert "Simplify context updates even more"
This reverts commit a32e63f131
.
* Revert "Remove special handling for elseifs that breaks for else if"
This reverts commit d7d9ddc653
.
* Fix test
2022-07-30 19:20:05 -04:00
Matthew Brown
e4f73beb08
Add comment for skipped test
2022-07-17 14:06:07 -04:00
Matt Brown
d7d9ddc653
Remove special handling for elseifs that breaks for else if
2022-07-17 12:51:17 -04:00
AndrolGenhald
285740a753
Merge branch '4.x'
2022-07-07 15:01:38 -05:00
AndrolGenhald
c271b1245e
Fix possibly empty array shape appearing non-empty ( fixes #8048 ).
2022-06-02 14:00:52 -05:00
Matt Brown
990887148c
Fix #7968 - combine and simplify types where necessary in ternary analysis
2022-05-19 22:32:14 -04:00
Matthew Brown
76119237cc
Fix #7776
...
When a new clause contains tautology it can be disregarded entirely
2022-03-12 23:21:42 -05:00
Matthew Brown
6d057669fc
Fix #6683 by improving simplification of CNF ( #7631 )
2022-02-10 19:37:42 -05:00
Matthew Brown
faaf7690f6
Remove mic-drop hack from if analysis ( #7484 )
...
* Remove mic-drop hack from if analysis
* Remove more special handling
* Remove some unnecessary ElseAnalyzer code
* Add back necessary code
* Fix return type of method never returning null
* Add a comment
* Simplify && handling
* Add comments to make stuff clearer
* Move if-specfic logic to more appropriate setting
2022-01-28 18:30:47 -05:00
Pete Walker
057a99c9f1
fix: Tests / minor bug
2022-01-22 00:00:45 +00:00
Matthew Brown
b49682a485
Simplify issue suppression in tests
2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys ( #7386 )
...
* Transformation that updates assertions
* Simplify transformation
* Ensure that all tests have keys
* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
orklah
dc2ac427ca
Don't remove a type because they have a common parent
2021-10-26 22:54:55 +02:00
orklah
8e0cf0e74b
add test
2021-10-25 20:16:58 +02:00
orklah
532aa9058b
add and fix tests
2021-10-02 10:01:05 +02:00
orklah
f62b83a190
Assert intersection type when two variables are compared ( #5774 )
2021-05-18 16:14:58 -04:00
orklah
1bb4a05725
NullsafeMethodCall makes the variable not null for the rest of the scope ( #5771 )
2021-05-14 19:21:01 -04:00
Matthew Brown
859b4a2caa
Fix #5725 – don’t transform non-docblock types unnecessarily
2021-05-09 12:03:42 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
Matt Brown
bef9ab37e6
Fix #4759 – don’t generate assertion when assigning to same-named variable
2020-12-03 09:42:26 -05:00
Matt Brown
41af653bd4
Add support for some dependent types
2020-11-24 14:50:35 -05:00
Matt Brown
3cde617ecc
Put assignment-in-conditional tests in their own file
2020-11-06 12:41:00 -05:00
Matt Brown
8dd5dc5b72
Improve algebra handling a little better
2020-10-26 16:34:56 -04:00
Matt Brown
94e26b2257
Empty checks variables are really falsy checks
2020-10-24 12:46:27 -04:00
Matt Brown
a832d77d73
Add logic to weed out unnecessary clauses
2020-10-24 11:31:36 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
bd27e8b17b
Fix #4109 - detect duplicate match condition
2020-09-02 20:08:09 -04:00
Brown
988e17f11d
Make clause fully immutable
2020-08-26 15:35:29 -04:00
Brown
e0f5595307
Fix #3932 - try to get assertions of negated expression if instant negation fails
2020-08-05 16:53:30 -04:00
Brown
550ba0a4c9
Compare to real outer context, not if one
...
Fixes #3091
2020-04-07 15:13:17 -04:00
Brown
61c979136f
Fix #3091 - simplify elseif negated clauses where possible
2020-04-07 13:04:24 -04:00
Matthew Brown
32d5c92428
Split up test
2020-03-29 18:28:49 -04:00
Brown
e1af0e01ee
Revert code back to how it was
2019-12-13 17:52:37 -05:00
Brown
6d02aa86e8
Reconcile string emptiness a bit better
2019-12-13 15:51:54 -05:00
Matthew Brown
8f25183784
Fix #2459 - don’t add assertions to parent context unnecessarily
2019-12-12 00:37:00 -05:00
Matthew Brown
d7fdd9b179
Move more tests into appropriate directory
2019-12-07 13:38:06 -05:00