1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Lukas Reschke
a1fd92d9fd
Add more Psalm flows for string functions (#4576)
This adds string functions from
https://www.php.net/manual/en/ref.strings.php

This commit adds the flows for functions from "addcslashes" to "sprintf".
More are to follow in later commits.

Ref #3636
2021-01-29 11:46:12 +01:00
Matt Brown
1ad65fb899
Fix #4517 - track type contradiction issues in match expressions 2021-01-29 11:46:07 +01:00
Matt Brown
0b32cb93a7
Add ReflectionUnionType stub 2021-01-29 11:46:06 +01:00
Matt Brown
e7a46452f5
Fix #4481 - ReflectionProperty implements Reflector 2021-01-29 11:46:03 +01:00
Matt Brown
b217916f37
Use better inference for getAttributes return type
Fixes #4367
2021-01-29 11:45:00 +01:00
Matt Brown
881068d5c0
Detect when targets are incorrectly targeted 2021-01-29 11:44:36 +01:00
Matt Brown
98b755fb6c
Add support for int-mask<...> and int-mask-of<...> 2021-01-29 11:44:35 +01:00
Jáchym Toušek
597b58d3a4
Add psalm-mutation-free to ext-ds (#4425)
* Add psalm-mutation-free to ext-ds

* Update ext-ds.php

* Update stubs/ext-ds.php

Co-authored-by: Jáchym Toušek <enumag@gmail.com>

Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:44:35 +01:00
Matt Brown
7c1c2f77f7
Use softer return 2021-01-29 11:44:35 +01:00
Matt Brown
97dc34bed3
Add polyfill for Stringable interface 2021-01-29 11:44:34 +01:00
Simon Podlipsky
35201697e9
Fix preg_match_all param name (#4416) 2021-01-29 11:44:32 +01:00
Benjamin Morel
36b7186712
Ds\Queue & Ds\Set implement ArrayAccess as well (#4415) 2021-01-29 11:44:32 +01:00
Matt Brown
d027bbf41b
Remove stubs with variadic middle params
Fixees #4377
2021-01-29 11:44:32 +01:00
Benjamin Morel
c4d1ee7cb1
Document ArrayAccess in PHP-DS (#4401) 2021-01-29 11:41:13 +01:00
orklah
c15fabbdcc
changing the templates order to match existing stub in PHPStan (#4332) 2021-01-29 11:39:55 +01:00
Marcus Bointon
fb505df807
Fix preg_match_all stub (#4325)
* preg_match_all can return false

* Test for preg_match_all returning false

* Fix test

* Add @psalm-ignore-falsable-return
2021-01-29 11:39:55 +01:00
Pol Dellaiera
9aaf61d220
CachingIterator - Add forgotten constructor parameter. (#4322)
Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2021-01-29 11:39:54 +01:00
Pol Dellaiera
2b437ad672
Add more standard iterators (#4320)
* Add CachingIterator, LimitIterator, InfiniteIterator, CallbackFilterIterator, NoRewindIterator.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>

* Add related Iterator tests.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2021-01-29 11:39:54 +01:00
Matt Brown
278a306681
Do arithmetic for preg_split arguments 2021-01-29 11:39:53 +01:00
Matt Brown
e999728892
Improve preg_split return more 2021-01-29 11:39:53 +01:00
Matt Brown
68526c39ad
Add better return type for preg_split 2021-01-29 11:39:52 +01:00
Matt Brown
a531c2e450
Move static code out of src 2021-01-29 11:39:51 +01:00