Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master from 5.x #10850

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
739d87d
Use wider class-string when combining class strings with intersections
weirdan Mar 9, 2024
005e318
Merge pull request #10800 from weirdan/10799-use-wider-classstring
weirdan Mar 9, 2024
00c2fef
Forbid named arguments for ArrayAcccess methods
weirdan Mar 9, 2024
c511185
Merge pull request #10804 from weirdan/10533-no-named-arguments-for-a…
weirdan Mar 10, 2024
20c7889
Allow more callable types as subtypes of `callable`
weirdan Mar 10, 2024
4a2cf93
Don't crash on invalid templates
weirdan Mar 11, 2024
ae1d510
Merge pull request #10806 from weirdan/9596-dont-crash-on-invalid-tem…
weirdan Mar 11, 2024
2a91bd6
Added test for #10807
SCIF Mar 11, 2024
fe42e88
Resolve fail test #10807
issidorov Mar 11, 2024
8471a89
Merge pull request #10812 from issidorov/bug-10807
weirdan Mar 11, 2024
4ea41cb
Merge branch '5.23.x' into 5.x
weirdan Mar 11, 2024
c9468b6
Introduce `TCallableInterface`
weirdan Mar 12, 2024
debffec
add support for named arguments for filter_var and filter_input
pilif Mar 13, 2024
9c5af0f
Promoted properties missing in extended __construct should report Pro…
kkmuffme Mar 13, 2024
a2307ac
report error for single param too since named args can even be used then
kkmuffme Mar 13, 2024
c174e35
Fix https://github.com/vimeo/psalm/issues/7550
kkmuffme Mar 13, 2024
c7fc76e
MissingClassConstType
jack-worman Mar 14, 2024
ad87c2e
Allow specifying flags to Codebase::isTypeContainedByType
danog Mar 15, 2024
b431e5f
cs-fix
danog Mar 15, 2024
431977c
[PHP 8.4] Fixes for implicit nullability deprecation
Ayesh Mar 15, 2024
ff168a9
Fix undefined parent not reported in callable
kkmuffme Mar 16, 2024
8815463
fix tests running with other than called PHP binary if called with a …
kkmuffme Mar 19, 2024
e8e1f47
Merge pull request #10842 from kkmuffme/fix-tests-using-other-than-ca…
danog Mar 19, 2024
ea825c6
Explicitly set value in config to fix warning in tests
kkmuffme Mar 19, 2024
8efbf38
fix bad class
kkmuffme Mar 19, 2024
45d9fbe
Merge pull request #10843 from kkmuffme/fix-psalm-6-notice-in-tests-c…
danog Mar 19, 2024
644ef8d
Merge pull request #10832 from Ayesh/php84/nullability
weirdan Mar 19, 2024
4b7957b
Merge pull request #10829 from vimeo/isTypeContainedByType_flags
weirdan Mar 19, 2024
f61c7e1
Merge pull request #10805 from weirdan/10461-allow-more-callable-type…
weirdan Mar 19, 2024
a59248f
self, parent and static in callable are deprecated since PHP 8.2
kkmuffme Mar 16, 2024
e83530a
report invalid callable if callable cannot be called like this from c…
kkmuffme Mar 19, 2024
e3d5526
Merge pull request #10838 from kkmuffme/undefined-parent-not-reported…
weirdan Mar 20, 2024
c5adc51
Merge pull request #10824 from kkmuffme/update-misc-deprecated-arg-ty…
weirdan Mar 20, 2024
98eab1f
Merge pull request #10822 from kkmuffme/report-param-name-mismatch-fo…
weirdan Mar 20, 2024
2c1ac98
Merge pull request #10815 from pilif/filter_var-named-args
weirdan Mar 20, 2024
3a1b10f
Merge pull request #10828 from jack-worman/MissingClassConstType
weirdan Mar 20, 2024
9cfce37
ParamNameMismatch not reported for __construct
kkmuffme Mar 13, 2024
cc5ad67
Merge pull request #10821 from kkmuffme/consistent-constructor-param-…
weirdan Mar 20, 2024
86173d2
When inside isset, array fetch can return null
edsrzf Feb 26, 2024
30e797b
Update baseline
edsrzf Feb 28, 2024
4b707d1
Additional array fetch test case
edsrzf Mar 4, 2024
70530d6
Merge pull request #10756 from edsrzf/array-isset
weirdan Mar 20, 2024
b47449f
Merge pull request #10817 from kkmuffme/promoted-properties-not-set-i…
weirdan Mar 20, 2024
375fe32
Update tests/CallableTest.php
weirdan Mar 20, 2024
4266a8e
Merge pull request #10839 from kkmuffme/misc-class-callable-errors-no…
weirdan Mar 20, 2024
2f90881
Update CallMap.php
ThomasLandauer Mar 21, 2024
2ae91aa
Update CallMap_historical.php
ThomasLandauer Mar 21, 2024
63ea4de
Merge pull request #10847 from ThomasLandauer/patch-1
weirdan Mar 21, 2024
2aed495
Merge branch '5.x' into update-master
weirdan Mar 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
<xs:element name="MismatchingDocblockParamType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MismatchingDocblockPropertyType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MismatchingDocblockReturnType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingClassConstType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingClosureParamType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingClosureReturnType" type="IssueHandlerType" minOccurs="0" />
<xs:element name="MissingConstructor" type="IssueHandlerType" minOccurs="0" />
Expand Down
40 changes: 20 additions & 20 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,17 +1142,17 @@
'crash' => [''],
'crc32' => ['int', 'string'=>'string'],
'crypt' => ['string', 'string'=>'string', 'salt'=>'string'],
'ctype_alnum' => ['bool', 'text'=>'string|int'],
'ctype_alpha' => ['bool', 'text'=>'string|int'],
'ctype_cntrl' => ['bool', 'text'=>'string|int'],
'ctype_digit' => ['bool', 'text'=>'string|int'],
'ctype_graph' => ['bool', 'text'=>'string|int'],
'ctype_lower' => ['bool', 'text'=>'string|int'],
'ctype_print' => ['bool', 'text'=>'string|int'],
'ctype_punct' => ['bool', 'text'=>'string|int'],
'ctype_space' => ['bool', 'text'=>'string|int'],
'ctype_upper' => ['bool', 'text'=>'string|int'],
'ctype_xdigit' => ['bool', 'text'=>'string|int'],
'ctype_alnum' => ['bool', 'text'=>'string'],
'ctype_alpha' => ['bool', 'text'=>'string'],
'ctype_cntrl' => ['bool', 'text'=>'string'],
'ctype_digit' => ['bool', 'text'=>'string'],
'ctype_graph' => ['bool', 'text'=>'string'],
'ctype_lower' => ['bool', 'text'=>'string'],
'ctype_print' => ['bool', 'text'=>'string'],
'ctype_punct' => ['bool', 'text'=>'string'],
'ctype_space' => ['bool', 'text'=>'string'],
'ctype_upper' => ['bool', 'text'=>'string'],
'ctype_xdigit' => ['bool', 'text'=>'string'],
'cubrid_affected_rows' => ['int', 'req_identifier='=>''],
'cubrid_bind' => ['bool', 'req_identifier'=>'resource', 'bind_param'=>'int', 'bind_value'=>'mixed', 'bind_value_type='=>'string'],
'cubrid_client_encoding' => ['string', 'conn_identifier='=>''],
Expand Down Expand Up @@ -1293,7 +1293,7 @@
'CURLFile::setMimeType' => ['void', 'mime_type'=>'string'],
'CURLFile::setPostFilename' => ['void', 'posted_filename'=>'string'],
'CURLStringFile::__construct' => ['void', 'data'=>'string', 'postname'=>'string', 'mime='=>'string'],
'current' => ['mixed|false', 'array'=>'array|object'],
'current' => ['mixed|false', 'array'=>'array'],
'cyrus_authenticate' => ['void', 'connection'=>'resource', 'mechlist='=>'string', 'service='=>'string', 'user='=>'string', 'minssf='=>'int', 'maxssf='=>'int', 'authname='=>'string', 'password='=>'string'],
'cyrus_bind' => ['bool', 'connection'=>'resource', 'callbacks'=>'array'],
'cyrus_close' => ['bool', 'connection'=>'resource'],
Expand Down Expand Up @@ -3269,7 +3269,7 @@
'get_call_stack' => [''],
'get_called_class' => ['class-string'],
'get_cfg_var' => ['string|false', 'option'=>'string'],
'get_class' => ['class-string', 'object='=>'object'],
'get_class' => ['class-string', 'object'=>'object'],
'get_class_methods' => ['list<non-falsy-string>', 'object_or_class'=>'object|class-string'],
'get_class_vars' => ['array<non-falsy-string,mixed>', 'class'=>'string'],
'get_current_user' => ['string'],
Expand All @@ -3290,7 +3290,7 @@
'get_magic_quotes_runtime' => ['int|false'],
'get_meta_tags' => ['array', 'filename'=>'string', 'use_include_path='=>'bool'],
'get_object_vars' => ['array<string,mixed>', 'object'=>'object'],
'get_parent_class' => ['class-string|false', 'object_or_class='=>'object|class-string'],
'get_parent_class' => ['class-string|false', 'object_or_class'=>'object|class-string'],
'get_required_files' => ['list<string>'],
'get_resource_id' => ['int', 'resource'=>'resource'],
'get_resource_type' => ['string', 'resource'=>'resource'],
Expand All @@ -3307,7 +3307,7 @@
'getimagesize' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: 3|4, bits?: int}|false', 'filename'=>'string', '&w_image_info='=>'array'],
'getimagesizefromstring' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: 3|4, bits?: int}|false', 'string'=>'string', '&w_image_info='=>'array'],
'getlastmod' => ['int|false'],
'getmxrr' => ['bool', 'hostname'=>'string', '&w_hosts'=>'array', '&w_weights='=>'array'],
'getmxrr' => ['bool', 'hostname'=>'string', '&w_hosts'=>'array<int, string>', '&w_weights='=>'array<int, int>'],
'getmygid' => ['int|false'],
'getmyinode' => ['int|false'],
'getmypid' => ['int|false'],
Expand Down Expand Up @@ -6198,7 +6198,7 @@
'kadm5_get_principals' => ['array', 'handle'=>'resource'],
'kadm5_init_with_password' => ['resource', 'admin_server'=>'string', 'realm'=>'string', 'principal'=>'string', 'password'=>'string'],
'kadm5_modify_principal' => ['bool', 'handle'=>'resource', 'principal'=>'string', 'options'=>'array'],
'key' => ['int|string|null', 'array'=>'array|object'],
'key' => ['int|string|null', 'array'=>'array'],
'key_exists' => ['bool', 'key'=>'string|int', 'array'=>'array'],
'krsort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
'ksort' => ['true', '&rw_array'=>'array', 'flags='=>'int'],
Expand Down Expand Up @@ -6598,7 +6598,7 @@
'mapObj::zoomScale' => ['int', 'nScaleDenom'=>'float', 'oPixelPos'=>'pointObj', 'nImageWidth'=>'int', 'nImageHeight'=>'int', 'oGeorefExt'=>'rectObj', 'oMaxGeorefExt'=>'rectObj'],
'max' => ['mixed', 'value'=>'non-empty-array'],
'max\'1' => ['mixed', 'value'=>'', 'values'=>'', '...args='=>''],
'mb_check_encoding' => ['bool', 'value='=>'array|string|null', 'encoding='=>'string|null'],
'mb_check_encoding' => ['bool', 'value'=>'array|string', 'encoding='=>'string|null'],
'mb_chr' => ['non-empty-string|false', 'codepoint'=>'int', 'encoding='=>'string|null'],
'mb_convert_case' => ['string', 'string'=>'string', 'mode'=>'int', 'encoding='=>'string|null'],
'mb_convert_encoding' => ['string|false', 'string'=>'string', 'to_encoding'=>'string', 'from_encoding='=>'array|string|null'],
Expand Down Expand Up @@ -8149,7 +8149,7 @@
'newrelic_set_appname' => ['bool', 'name'=>'string', 'license='=>'string', 'xmit='=>'bool'],
'newrelic_set_user_attributes' => ['bool', 'user'=>'string', 'account'=>'string', 'product'=>'string'],
'newrelic_start_transaction' => ['bool', 'appname'=>'string', 'license='=>'string'],
'next' => ['mixed', '&r_array'=>'array|object'],
'next' => ['mixed', '&r_array'=>'array'],
'ngettext' => ['string', 'singular'=>'string', 'plural'=>'string', 'count'=>'int'],
'nl2br' => ['string', 'string'=>'string', 'use_xhtml='=>'bool'],
'nl_langinfo' => ['string|false', 'item'=>'int'],
Expand Down Expand Up @@ -9429,7 +9429,7 @@
'preg_replace_callback_array\'1' => ['string[]|null', 'pattern'=>'array<string,callable(array):string>', 'subject'=>'string[]', 'limit='=>'int', '&w_count='=>'int', 'flags='=>'int'],
'preg_split' => ['list<string>|false', 'pattern'=>'string', 'subject'=>'string', 'limit'=>'int', 'flags='=>'null'],
'preg_split\'1' => ['list<string>|list<list<string|int>>|false', 'pattern'=>'string', 'subject'=>'string', 'limit='=>'int', 'flags='=>'int'],
'prev' => ['mixed', '&r_array'=>'array|object'],
'prev' => ['mixed', '&r_array'=>'array'],
'print' => ['int', 'arg'=>'string'],
'print_r' => ['string', 'value'=>'mixed'],
'print_r\'1' => ['true', 'value'=>'mixed', 'return='=>'bool'],
Expand Down Expand Up @@ -10699,7 +10699,7 @@
'register_tick_function' => ['bool', 'callback'=>'callable():void', '...args='=>'mixed'],
'rename' => ['bool', 'from'=>'string', 'to'=>'string', 'context='=>'resource'],
'rename_function' => ['bool', 'original_name'=>'string', 'new_name'=>'string'],
'reset' => ['mixed|false', '&r_array'=>'array|object'],
'reset' => ['mixed|false', '&r_array'=>'array'],
'ResourceBundle::__construct' => ['void', 'locale'=>'?string', 'bundle'=>'?string', 'fallback='=>'bool'],
'ResourceBundle::count' => ['int'],
'ResourceBundle::create' => ['?ResourceBundle', 'locale'=>'?string', 'bundle'=>'?string', 'fallback='=>'bool'],
Expand Down
68 changes: 68 additions & 0 deletions dictionaries/CallMap_81_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,74 @@
'old' => ['int|false', '&rw_read'=>'?resource[]', '&rw_write'=>'?resource[]', '&rw_except'=>'?resource[]', 'seconds'=>'?int', 'microseconds='=>'int'],
'new' => ['int|false', '&rw_read'=>'?resource[]', '&rw_write'=>'?resource[]', '&rw_except'=>'?resource[]', 'seconds'=>'?int', 'microseconds='=>'?int'],
],
'mb_check_encoding' => [
'old' => ['bool', 'value='=>'array|string|null', 'encoding='=>'string|null'],
'new' => ['bool', 'value'=>'array|string', 'encoding='=>'string|null'],
],
'ctype_alnum' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_alpha' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_cntrl' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_digit' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_graph' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_lower' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_print' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_punct' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_space' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_upper' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'ctype_xdigit' => [
'old' => ['bool', 'text'=>'string|int'],
'new' => ['bool', 'text'=>'string'],
],
'key' => [
'old' => ['int|string|null', 'array'=>'array|object'],
'new' => ['int|string|null', 'array'=>'array'],
],
'current' => [
'old' => ['mixed|false', 'array'=>'array|object'],
'new' => ['mixed|false', 'array'=>'array'],
],
'next' => [
'old' => ['mixed', '&r_array'=>'array|object'],
'new' => ['mixed', '&r_array'=>'array'],
],
'prev' => [
'old' => ['mixed', '&r_array'=>'array|object'],
'new' => ['mixed', '&r_array'=>'array'],
],
'reset' => [
'old' => ['mixed|false', '&r_array'=>'array|object'],
'new' => ['mixed|false', '&r_array'=>'array'],
],
],

'removed' => [
Expand Down
8 changes: 8 additions & 0 deletions dictionaries/CallMap_83_delta.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@
'old' => ['string|false', 'haystack'=>'string', 'needle'=>'string'],
'new' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
],
'get_class' => [
'old' => ['class-string', 'object='=>'object'],
'new' => ['class-string', 'object'=>'object'],
],
'get_parent_class' => [
'old' => ['class-string|false', 'object_or_class='=>'object|class-string'],
'new' => ['class-string|false', 'object_or_class'=>'object|class-string'],
],
],

'removed' => [
Expand Down
2 changes: 1 addition & 1 deletion dictionaries/CallMap_historical.php
Original file line number Diff line number Diff line change
Expand Up @@ -10671,7 +10671,7 @@
'getimagesize' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: 3|4, bits?: int}|false', 'filename'=>'string', '&w_image_info='=>'array'],
'getimagesizefromstring' => ['array{0:int, 1: int, 2: int, 3: string, mime: string, channels?: 3|4, bits?: int}|false', 'string'=>'string', '&w_image_info='=>'array'],
'getlastmod' => ['int|false'],
'getmxrr' => ['bool', 'hostname'=>'string', '&w_hosts'=>'array', '&w_weights='=>'array'],
'getmxrr' => ['bool', 'hostname'=>'string', '&w_hosts'=>'array<int, string>', '&w_weights='=>'array<int, int>'],
'getmygid' => ['int|false'],
'getmyinode' => ['int|false'],
'getmypid' => ['int|false'],
Expand Down
1 change: 1 addition & 0 deletions docs/running_psalm/error_levels.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Level 5 and above allows a more non-verifiable code, and higher levels are even
- [InvalidDocblockParamName](issues/InvalidDocblockParamName.md)
- [InvalidFalsableReturnType](issues/InvalidFalsableReturnType.md)
- [InvalidStringClass](issues/InvalidStringClass.md)
- [MissingClassConstType](issues/MissingClassConstType.md)
- [MissingClosureParamType](issues/MissingClosureParamType.md)
- [MissingClosureReturnType](issues/MissingClosureReturnType.md)
- [MissingConstructor](issues/MissingConstructor.md)
Expand Down
1 change: 1 addition & 0 deletions docs/running_psalm/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
- [MismatchingDocblockParamType](issues/MismatchingDocblockParamType.md)
- [MismatchingDocblockPropertyType](issues/MismatchingDocblockPropertyType.md)
- [MismatchingDocblockReturnType](issues/MismatchingDocblockReturnType.md)
- [MissingClassConstType](issues/MissingClassConstType.md)
- [MissingClosureParamType](issues/MissingClosureParamType.md)
- [MissingClosureReturnType](issues/MissingClosureReturnType.md)
- [MissingConstructor](issues/MissingConstructor.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/running_psalm/issues/ConstructorSignatureMismatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Emitted when a constructor parameter differs from a parent constructor parameter
* @psalm-consistent-constructor
*/
class A {
public function __construct(int $i) {}
public function __construct(int $s) {}
}
class B extends A {
public function __construct(string $s) {}
Expand Down
21 changes: 21 additions & 0 deletions docs/running_psalm/issues/MissingClassConstType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MissingClassConstType

Emitted when a class constant doesn't have a declared type.

```php
<?php

class A {
public const B = 0;
}
```

Correct with:

```php
<?php

class A {
public const int B = 0;
}
```
33 changes: 24 additions & 9 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@c488d40e6243536a42608bbe37245f07ebebe1ad">
<files psalm-version="dev-master@c1ef723d2f810669d3caa99de4f65631ef4e3781">
<file src="examples/TemplateChecker.php">
<PossiblyUndefinedIntArrayOffset>
<code><![CDATA[$comment_block->tags['variablesfrom'][0]]]></code>
Expand Down Expand Up @@ -713,6 +713,7 @@
<code><![CDATA[$overridden_template_types]]></code>
<code><![CDATA[$static_class_storage->template_extended_params]]></code>
<code><![CDATA[$static_class_storage->template_types]]></code>
<code><![CDATA[empty($non_trait_class_storage->overridden_method_ids[$method_name])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallAnalyzer.php">
Expand Down Expand Up @@ -940,8 +941,6 @@
<code><![CDATA[$extended_var_id]]></code>
<code><![CDATA[$keyed_array_var_id]]></code>
<code><![CDATA[$keyed_array_var_id]]></code>
<code><![CDATA[$keyed_array_var_id]]></code>
<code><![CDATA[$keyed_array_var_id]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/AtomicPropertyFetchAnalyzer.php">
Expand Down Expand Up @@ -1190,6 +1189,7 @@
<code><![CDATA[$file_path]]></code>
<code><![CDATA[$migrated_source_fqcln]]></code>
<code><![CDATA[$migrated_source_fqcln]]></code>
<code><![CDATA[empty($classlike_storage->overridden_method_ids[$method_name])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Codebase/Functions.php">
Expand All @@ -1210,9 +1210,6 @@
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Codebase/Methods.php">
<InvalidArgument>
<code><![CDATA[$class_storage->methods[$declaring_method_name]->stubbed]]></code>
</InvalidArgument>
<RiskyTruthyFalsyComparison>
<code><![CDATA[!$calling_class_name]]></code>
<code><![CDATA[!$extends]]></code>
Expand All @@ -1238,9 +1235,6 @@
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Codebase/Populator.php">
<InvalidArgument>
<code><![CDATA[$storage->methods[$implementing_method_id->method_name]->abstract]]></code>
</InvalidArgument>
<RiskyTruthyFalsyComparison>
<code><![CDATA[!strpos($fq_classlike_name_lc, '\\')]]></code>
<code><![CDATA[$mapped_name]]></code>
Expand Down Expand Up @@ -1481,6 +1475,9 @@
<code><![CDATA[$var_comment->line_number]]></code>
<code><![CDATA[$var_comment->type_end]]></code>
<code><![CDATA[$var_comment->type_start]]></code>
<code><![CDATA[empty($imported_type_data[0])]]></code>
<code><![CDATA[empty($imported_type_data[2])]]></code>
<code><![CDATA[empty($imported_type_data[4])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/PhpVisitor/Reflector/ExpressionResolver.php">
Expand Down Expand Up @@ -1514,6 +1511,9 @@
<code><![CDATA[$line_parts[0]]]></code>
<code><![CDATA[$line_parts[1]]]></code>
</PossiblyUndefinedIntArrayOffset>
<RiskyTruthyFalsyComparison>
<code><![CDATA[empty($since_match[4])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php">
<PossiblyUndefinedArrayOffset>
Expand Down Expand Up @@ -1620,6 +1620,13 @@
<file src="src/Psalm/Internal/Provider/FileReferenceProvider.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$this->cache->getFileMapCache()]]></code>
<code><![CDATA[empty(self::$file_references_to_class_members[$method_id])]]></code>
<code><![CDATA[empty(self::$file_references_to_class_properties[$property_id])]]></code>
<code><![CDATA[empty(self::$file_references_to_method_returns[$method_id])]]></code>
<code><![CDATA[empty(self::$method_param_uses[$method_id][$offset])]]></code>
<code><![CDATA[empty(self::$method_references_to_class_members[$method_id])]]></code>
<code><![CDATA[empty(self::$method_references_to_class_properties[$property_id])]]></code>
<code><![CDATA[empty(self::$method_references_to_method_returns[$method_id])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Provider/FileStorageCacheProvider.php">
Expand Down Expand Up @@ -1714,6 +1721,7 @@
<file src="src/Psalm/Internal/Scanner/DocblockParser.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$first_line_padding]]></code>
<code><![CDATA[empty($special[$type])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Scanner/PhpStormMetaScanner.php">
Expand Down Expand Up @@ -1865,6 +1873,7 @@
<file src="src/Psalm/Internal/Type/TemplateInferredTypeReplacer.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$classlike_storage->template_extended_params]]></code>
<code><![CDATA[empty($inferred_lower_bounds[$atomic_type->offset_param_name])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php">
Expand All @@ -1878,6 +1887,7 @@
<code><![CDATA[empty($class_storage->template_extended_params[$container_class])]]></code>
<code><![CDATA[empty($classlike_storage->template_extended_params[$base_type->as_type->value])]]></code>
<code><![CDATA[empty($classlike_storage->template_extended_params[$base_type->value])]]></code>
<code><![CDATA[empty($template_result->lower_bounds[$atomic_type->offset_param_name])]]></code>
<code><![CDATA[strpos($key, '&')]]></code>
</RiskyTruthyFalsyComparison>
</file>
Expand Down Expand Up @@ -2318,6 +2328,11 @@
<code><![CDATA[public function getProjectDirectories(): array]]></code>
</MethodSignatureMismatch>
</file>
<file src="tests/Internal/Codebase/InternalCallMapHandlerTest.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[empty($normalizedEntry['type'])]]></code>
</RiskyTruthyFalsyComparison>
</file>
<file src="tests/TypeParseTest.php">
<RiskyTruthyFalsyComparison>
<code><![CDATA[$param_type_1]]></code>
Expand Down
Loading
Loading