Alies Lapatsin
c60eada3f7
#4772 Mark 3rd argument of get_headers nullable and optional ( #4774 )
...
There is no documentation that $context is nullable but it’s better to mark is nullable and use default value so psalm will not ask to use all 3 parameters.
2021-01-29 11:47:14 +01:00
Matt Brown
1c48258fe2
Fix range return type to always non-empty lists
2021-01-29 11:47:04 +01:00
Matthew Brown
51fed99c5d
Fix core return types
2021-01-29 11:46:25 +01:00
orklah
30f1a498a3
restore str_split as a list ( #4694 )
2021-01-29 11:46:25 +01:00
Matt Brown
8a7a1124a4
Fix some stubs
2021-01-29 11:46:24 +01:00
Lukas Reschke
31c63a6c96
Add some more flows ( #4659 )
...
* Add some more flows
- Adds all relevant JSON flows https://www.php.net/manual/en/ref.json.php
- Adds all relevant misc flows https://www.php.net/manual/en/ref.misc.php
- Adds a small subset of URL flows https://www.php.net/manual/en/ref.url.php
* Update CoreGenericFunctions.phpstub
2021-01-29 11:46:21 +01:00
Lukas Reschke
4de2bf8f7f
Add psalm-flow for string functions from sscanf to wordwrap ( #4591 )
...
* Add string functions from sscanf to wordwrap
This should conclude all string functions from https://www.php.net/manual/en/book.strings.php
Continuation of https://github.com/vimeo/psalm/pull/4576
Ref https://github.com/vimeo/psalm/issues/3636
* Add StrTrReturnTypeProvider
* Fix psalm error
* phpcs
* Line length
* Ignore false return on vsprintf
Co-authored-by: Matthew Brown <github@muglug.com>
2021-01-29 11:46:19 +01:00
Lukas Reschke
ce05165384
Split LDAP into custom category ( #4604 )
...
- Adds ldap_escape as sanitizer
- Defines the right parameters to ldap_search as sink
- Wrote documentation
- Added tests
2021-01-29 11:46:14 +01:00
Michael Stilkerich
aa4372db9a
Stub for preg_filter ( #4587 )
2021-01-29 11:46:13 +01:00
Matt Brown
e371685c3b
Allow PHP major version to determine substr return type
2021-01-29 11:46:12 +01:00
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
98b755fb6c
Add support for int-mask<...> and int-mask-of<...>
2021-01-29 11:44:35 +01:00
Simon Podlipsky
35201697e9
Fix preg_match_all param name ( #4416 )
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
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
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