kkmuffme
87eb83616e
add basename return type provider
...
Like dirname return type provider of https://github.com/vimeo/psalm/pull/8611
2022-10-26 13:03:53 +02:00
Chauncey McAskill
0afd873787
Fix dirname return type provider
...
Changed:
- Replaced extraction of `$dir_level` literal value to be from the NodeTypeProvider instead of from the statement; based on similar logic in `RoundReturnTypeProvider`.
- Replaced `new` return type creation with `Type` method creation.
- Replaced `null` return with string type.
Fixed:
- Typo on variable name for extracted `StatementsSource`.
- Edge case where `$dir_level` is less than 1.
- Broken unit tests.
2022-10-23 12:11:58 -04:00
Chauncey McAskill
1dfadfa9ec
Add dirname return type provider
2022-10-23 11:56:02 -04:00
c9ff8c2c67
Prevent re-resolution of static
2022-10-17 20:31:11 +02:00
7b6e09afc9
Merge branch 'merge_4.x' into immutable_readonly_3
2022-10-17 12:58:41 +02:00
56805ab089
Fix
2022-10-17 12:54:46 +02:00
15f5c593a7
Fix
2022-10-17 12:40:50 +02:00
1abade3c30
Skip
2022-10-17 12:14:07 +02:00
150be5ca22
Update
2022-10-17 10:45:18 +02:00
8d4d0c0e4a
Fixes
2022-10-17 10:33:33 +02:00
53e3889745
Fixes
2022-10-17 10:21:26 +02:00
f816c06331
Fix
2022-10-16 14:39:34 +02:00
8518372cad
Fixes
2022-10-16 14:23:31 +02:00
34000ca90d
Fixes
2022-10-16 13:59:15 +02:00
cbd1a27ea7
Merge branch 'master' into merge_4.x
2022-10-16 13:49:21 +02:00
b79c43a288
Merge remote-tracking branch 'origin/4.x' into merge_4.x
2022-10-16 13:42:43 +02:00
748a74bb2c
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-10-16 13:41:27 +02:00
orklah
921801707d
Merge pull request #8583 from gphargreaves/#8484/fix-datetimeimmutable-sub
...
Correct return type of DateTimeImmutable sub method stub
2022-10-15 14:51:43 +02:00
ADmad
9bd4d7a740
Fix template param for SplDoublyLinkedList.
...
It's key is always an integer.
2022-10-14 11:54:53 +05:30
Greg Hargreaves
06581ce4b0
Add additional checks for concat of non-empty strings to return non-falsy
2022-10-14 01:54:06 +01:00
Greg Hargreaves
8849e8ca38
Fix test for DateTimeImmutable sub method return type
2022-10-14 00:59:54 +01:00
8c9558c92b
Fix #6983 , #8564
2022-10-13 13:42:35 +02:00
orklah
bb9aabe5b1
Merge pull request #8570 from Nicelocal/fix_8569
...
Fix #8569
2022-10-12 20:59:04 +02:00
a7af027645
Fix #8562
2022-10-12 11:40:29 +02:00
3ac0bce203
Fix #8569
2022-10-12 11:24:42 +02:00
Steven Dickinson
68f6ba873e
Fix MinMaxReturnTypeProvider when handling TDependentListKeys
2022-10-11 14:13:40 +01:00
Alies Lapatsin
30dc46528d
Cleaup $ignoredFunctions
2022-10-09 17:40:36 +03:00
f06c459415
Bugfix
2022-10-07 13:18:57 +02:00
Gregory Hargreaves
41a6afda32
Add check for const with reserved word class
2022-10-07 09:44:10 +01:00
Peter de Blieck
15453d4306
Removed imap_delete and imap_undelete from the ignoredFunctions list.
2022-10-06 14:44:49 +02:00
0155ad7472
Immutable readonly 3
2022-10-03 15:13:47 +02:00
45452c7125
Immutable readonly 2
2022-10-03 14:02:41 +02:00
c2ce7e63da
Immutable readonly 1
2022-10-03 11:53:05 +02:00
f11ed46f26
Immutable assertions
2022-10-03 11:32:15 +02:00
ef60a0c88c
Fix properties-of on generics&intersections
2022-10-03 11:28:01 +02:00
3abd0b961f
Immutable Unions
2022-10-03 10:45:36 +02:00
kkmuffme
328561d388
add code for faster debugging next time
2022-09-22 01:01:08 +02:00
kkmuffme
ce76158085
fix crash in <PHP8 with ResourceBundle
...
partially reverts https://github.com/vimeo/psalm/pull/8217
2022-09-22 01:01:08 +02:00
kkmuffme
d69e062426
add RiskyCast tests
2022-09-20 10:59:46 +02:00
kkmuffme
d69be4b9a2
objects even with __toString methods cannot be cast to int/float
2022-09-19 21:54:16 +02:00
Ricardo Boss
bf1c0320fd
Cherry-pick: Try to provide literal int types when possible ( fixes #6966 ) ( #7071 )
...
* Fixed vimeo/psalm#6966
* Only accept >= 0 values for mode argument in round()
* Made round() only return float or literal float values and remove unneeded test
* Registered RoundReturnTypeProvider
* Updated cast analyzer to handle single string literal int values as literal ints
* Fixed psalm errors
* Fix invalid property accesses
* Addressed comments
* Added Tests
* Marked RoundReturnTypeProvider as internal
* Fixed CS
2022-09-19 21:54:16 +02:00
dennis
3a6b709845
Test to describe use statements being applied
2022-09-19 21:09:45 +02:00
dennis
ab690df4da
Improved class name generation for @throws annotation
2022-09-19 21:09:45 +02:00
dennis
8ffc747349
Add test to document cross namespace behaviour
2022-09-19 21:09:45 +02:00
dennis
b88d2890e2
Fix existing tests
2022-09-19 21:09:45 +02:00
dennis
44785fadfc
Introduce test with code inside namespace
2022-09-19 21:09:45 +02:00
orklah
3b7e508c78
Merge pull request #8473 from kkmuffme/detailed-superglobal-types
...
make superglobals more specific
2022-09-19 10:48:44 +02:00
kkmuffme
e2e6265ba1
ignore nullable issues for $argv/$argc
2022-09-19 09:45:55 +02:00
Peter van Dommelen
05f28ce8cd
Do not widen type to mixed
and lose the existing type information when an Any
assertion is used.
...
Fixes #8084 .
2022-09-18 17:02:09 +02:00
orklah
5db59910bd
Merge pull request #8491 from HypeMC/array-column-fix
...
Fix array_column with object and column name null
2022-09-18 11:25:42 +02:00