orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00:00
Matthew Brown
3390097b35
Fix #4874 - remove strok stub
2020-12-21 17:14:25 +00:00
Alies Lapatsin
c07cba8da4
#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.
2020-12-03 23:14:43 -05:00
Matt Brown
0ea4a702ed
Fix range return type to always non-empty lists
2020-11-27 20:09:53 -05:00
Matthew Brown
1320081d27
Fix core return types
2020-11-25 11:49:51 -05:00
orklah
45c6189190
restore str_split as a list ( #4694 )
2020-11-24 15:01:46 -05:00
Matt Brown
27b7de285e
Fix some stubs
2020-11-24 10:44:33 -05:00
Lukas Reschke
7ac42551de
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
2020-11-22 12:09:55 -05:00
Lukas Reschke
3943b55f8a
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>
2020-11-21 17:35:07 -05:00
Lukas Reschke
ddbfbb28e6
Split LDAP into custom category ( #4604 )
...
- Adds ldap_escape as sanitizer
- Defines the right parameters to ldap_search as sink
- Wrote documentation
- Added tests
2020-11-18 11:39:36 -05:00
Michael Stilkerich
fec51eac8d
Stub for preg_filter ( #4587 )
2020-11-17 15:15:29 -05:00
Matt Brown
42802e11d1
Allow PHP major version to determine substr return type
2020-11-16 16:31:33 -05:00
Lukas Reschke
6780b01453
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
2020-11-16 15:50:07 -05:00
Matt Brown
4ea87b9054
Add support for int-mask<...> and int-mask-of<...>
2020-10-30 13:28:45 -04:00
Simon Podlipsky
6bbf06f7cc
Fix preg_match_all param name ( #4416 )
2020-10-26 11:53:03 -04:00
Matt Brown
5cda754a9c
Remove stubs with variadic middle params
...
Fixees #4377
2020-10-25 21:07:13 -04:00
Marcus Bointon
e172e88274
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
2020-10-14 19:59:07 -04:00
Matt Brown
bb7d7132f7
Do arithmetic for preg_split arguments
2020-10-12 20:26:02 -04:00
Matt Brown
2ac2da6079
Improve preg_split return more
2020-10-12 19:16:48 -04:00
Matt Brown
f83b50460a
Add better return type for preg_split
2020-10-12 13:04:28 -04:00
Matt Brown
f3b05f5ab5
Move static code out of src
2020-10-12 00:59:19 -04:00