Bruce Weirdan
f36766bf99
Improve CoreGenericClasses ( #2402 )
...
- general formatting
- Better definition for iterator class for `ArrayObject`
- Better definition for callable parameters to `ArrayObject`/`ArrayIterator` `uksort`/`uasort`
- Fixed signature for `ArrayIterator::current()`
- Fixed signature for `DOMNodeList::item()`
2019-12-01 09:53:48 -05:00
Matthew Brown
6ff06a4b32
Don’t bypass generator second arg when checking variance
2019-11-30 01:27:27 -05:00
Matthew Brown
8f8301b6de
Align Generator covariance with PHPStan
2019-11-30 01:11:50 -05:00
Matthew Brown
1b9273c8c0
Make other Generator params covariant
2019-11-30 01:02:51 -05:00
Matthew Brown
c65540a323
Fix some templating issues in CoreGenericClasses
2019-11-30 00:27:07 -05:00
Matthew Brown
a4e18f9b5e
Fix #2386 - make generator params invariant
2019-11-29 01:44:31 -05:00
Bruce Weirdan
377e47c8bd
Added WeakReference support ( #2389 )
2019-11-29 01:21:38 -05:00
Valentin Udaltsov
4a742f9940
Added array_key_first and array_key_last stubs ( #2381 )
2019-11-27 10:59:12 -05:00
Pavel Batečko
4e594e0a65
Improve array function list handling ( #2377 )
...
* array_column() returns a list unless the 3rd arg is passed
* array_pad() return type provider
* array_chunk() return type provider
* array_map() preserve list types
2019-11-26 14:48:49 -05:00
Mikko Pesari
e82d3c438d
Fix wrong annotations in ext-ds method stubs ( #2263 )
...
* Fix wrong annotation for class implementing an interface
* Fix unrecognised annotations
2019-10-22 09:33:23 -04:00
Joram Schrijver
39b25f9008
Fix ArrayIterator::{uasort,uksort} parameter type ( #2254 )
2019-10-22 08:45:25 -04:00
Mikko Pesari
fc16eb5e92
Fix Ds\Set method stubs ( #2261 )
...
* Fix constructor parameters
* Add missing @param name
* Add missing implements
2019-10-22 06:12:35 -04:00
Mikko Pesari
80665850db
Add method stubs for Ds\Set ( #2255 )
...
* Fix typo
* Add method stubs for Ds\Set
2019-10-21 10:06:26 -04:00
Brown
89752b8574
Support ext-ds and fix offset count
2019-10-18 11:35:24 -04:00
Brown
b75720c32b
Add more list types
2019-10-09 10:04:34 -04:00
Matthew Brown
38de68f507
array_values should preserve array non-emptiness
2019-10-08 22:22:58 -04:00
Brown
16c33d1565
Add support for list type
...
Fixes #2209
2019-10-08 18:44:46 -04:00
Guuzen
50df2868f2
Fix issue #2201 ( #2212 )
2019-10-06 15:28:41 -04:00
SignpostMarv
943705ce0e
load an xdebug stub when required, re: vimeo/psalm#2118 ( #2133 )
...
* load an xdebug stub when required, re: vimeo/psalm#2118
* correcting case sensitivity of XDebug to Xdebug
* only load the Xdebug stub when needed
2019-09-14 10:13:39 -04:00
Matthew Brown
0fc8c9a9bb
Soften definition of purity to allow functions that return by-ref output
2019-09-08 11:32:04 -04:00
Niklas Keller
25fbd5ddf7
Fix Generator::throw parameter type ( #2059 )
2019-08-26 00:25:17 -04:00
Matthew Brown
e6a93b6d52
Revert "Added ArrayObject
to the array_key_exists
signature ( #2066 )" ( #2070 )
...
This reverts commit 431678c25d
.
2019-08-25 23:46:13 -04:00
Ivan Kurnosov
431678c25d
Added ArrayObject
to the array_key_exists
signature ( #2066 )
2019-08-25 21:40:53 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
4002504ff0
Allow trait_exists to inform type for ReflectionClass
2019-05-31 09:43:46 -04:00
Brown
8c653b0312
Improve dead code detection a little more
2019-05-20 18:25:11 -04:00
Matthew Brown
721865d14b
Ignore falsable return for array_combine
2019-05-12 19:37:46 -04:00
Lars Moelleken
399a337e09
revert "array_change_key_case()" changes
...
-> https://github.com/vimeo/psalm/pull/1605#discussion_r281034696
2019-05-12 19:37:46 -04:00
Lars Moelleken
54a14055af
"usort": revert small change in the phpdoc
2019-05-12 19:37:46 -04:00
Lars Moelleken
0b5680f72f
fix return type of "array_combine()" && "array_replace()"
2019-05-12 19:37:46 -04:00
Brown
751253ddf0
Fix #1603 - prevent invalid covariant template classes from being passed
2019-05-06 16:38:08 -04:00
Bruce Weirdan
01bd2d33cd
Fix param name
...
Co-Authored-By: bugreportuser <37939393+bugreportuser@users.noreply.github.com>
2019-03-31 14:22:19 -04:00
bugreportuser
4fc7e4affc
Give errors for all uncaught exceptions
2019-03-31 14:22:19 -04:00
Matthew Brown
4865f66aeb
Allow better comparisons for templated types
2019-03-17 18:52:42 -04:00
Brown
441d3c4693
Fix #1470 - array_reverse should preserve count
2019-03-15 16:39:31 -04:00
Matthew Brown
42d4156423
Add DOMElement constructor
2019-03-01 00:09:22 -05:00
bugreportuser
24cdb6e1d3
Fix array_unique stub
2019-02-17 21:35:54 -05:00
Matthew Brown
0ec83a24d4
Fix docblocks cc @SignpostMarv
2019-02-10 20:57:22 -05:00
SignpostMarv
230821591a
amending methods
2019-02-10 20:40:32 -05:00
SignpostMarv
60f9d3558c
templating for ReflectionClass
2019-02-10 20:40:32 -05:00
Matthew Brown
6d0e78540a
Only move issue once
2019-02-07 18:47:50 -05:00
SignpostMarv
3de4457a45
adding type-hinting stub for array_chunk()
2019-02-06 16:43:22 -05:00
Matthew Brown
c758678022
Fix remaining issues
2019-02-06 16:08:41 -05:00
Matthew Brown
d18ef9c6e1
Add ideal stub return types
2019-02-06 16:08:41 -05:00
Aaron Piotrowski
b0d97843ce
Update Amp usage
...
Fixed a few errors and used byte-stream for reading and writing.
2019-02-06 16:08:41 -05:00
Matthew Brown
263a4c8cf1
Use Amp for handling language server event loop
2019-02-06 16:08:41 -05:00
Brown
e8a157f8d7
Add missing second arg
2019-02-04 18:00:23 -05:00
Brown
27428b8743
Allow ArrayAccess::offsetGet to return null
2019-02-04 17:27:08 -05:00
Brown
3f289731bb
Add ability to check descendants in ignored exceptions
2019-01-31 18:40:40 -05:00
Brown
900d5fa9db
Fix ArrayIterator::unserialize return type
2019-01-30 14:56:10 -05:00
Brown
4bc2fcc2f8
Fix serialized interface usage and generic ArrayIterator offset methods
2019-01-30 14:32:08 -05:00
Brown
d52fd70fd6
Fix invalid inheritance for SplObjectStorage
2019-01-30 13:48:05 -05:00
Brown
8c27bd77f6
Fix #1259 - add support for SplObjectStorage type params
2019-01-30 13:03:22 -05:00
Brown
819489e68d
Add method that reflection doesn’t know exists
2019-01-28 17:09:23 -05:00
Brown
a801923502
Add support for SplQueue templating
2019-01-28 12:27:04 -05:00
Matthew Brown
f67bab6d52
Restrict template-extends to actual extends
2019-01-27 21:00:27 -05:00
Matthew Brown
22ee72808a
Remove a bunch of hacks around generic offsets
...
Also fixes #1245
2019-01-26 16:58:49 -05:00
Brown
0d52dc4e00
Fix #1232 - allow checking of extended templated function returns
2019-01-24 15:03:13 -05:00
Matthew Brown
ed68cb973d
Fix #1109 - add bad usort protection
2019-01-19 18:11:49 -05:00
Matthew Brown
ff958ef643
Fix inheritance of method params
2019-01-11 08:54:10 -05:00
Brown
f108badd03
Fix #1067 - add support for @template-extends
2019-01-10 16:59:44 -05:00
Matthew Brown
9d8c2792e2
Add array-key type and improve general type handling
...
Fixes #1144
2019-01-05 00:15:53 -05:00
Brown
fb848d62e9
Add checks for if (count($a)) and if (count($a) [operator] [number])
2018-12-19 16:15:19 -05:00
Matthew Brown
ea89a6ba29
Revert "First pass"
...
This reverts commit 9ed047234f
.
2018-12-19 08:45:14 -05:00
Matthew Brown
9ed047234f
First pass
2018-12-19 01:59:14 -05:00
Matthew Brown
b052e211a0
Improve internal typing for sabre/event promises
2018-12-10 23:18:53 -05:00
Matthew Brown
93662abf8d
Shift iterable arg by one if only one is given
2018-12-02 14:59:08 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00