1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
Melech Mizrachi f553392454 Fix a false flag issue with InvalidConstantAssignmentValue being thrown for constants over a certain length. Usually happens with arrays or lists over 100+ entries in length.
Check if this type was defined via a dockblock or type hint otherwise the inferred type should always match the assigned type, and we don't even need to do additional checks
There is an issue with constants over a certain length where additional values are added to fallback_params in the assigned_type but not in const_storage_type which causes a false flag for this error to appear. Usually happens with arrays/lists.

Added two separate tests to cover both lists, and arrays to ensure this issue is fixed.
2024-02-23 11:25:34 -07:00
2023-11-22 15:27:19 +01:00
2023-10-26 17:00:29 +02:00
2022-12-20 23:50:01 -04:00
2022-11-08 20:35:26 -05:00
2022-12-20 20:52:25 +00:00
2022-11-26 00:00:43 -04:00
2024-02-04 21:07:22 +13:00
2022-12-21 06:45:45 -06:00
2022-12-23 16:13:46 -06:00
2022-01-03 12:04:35 +02:00
2022-01-03 12:04:35 +02:00
2022-01-03 12:04:35 +02:00
2022-01-03 12:04:35 +02:00
2022-11-25 23:58:41 -04:00
2022-12-19 22:14:32 +01:00

Psalm

Packagist Packagist Psalm coverage Psalm level

Psalm is a static analysis tool for finding errors in PHP applications.

Installation

To get started, check out the installation guide.

Live Demo

You can play around with Psalm on its website.

Documentation

Documentation is available on Psalms website, generated from the docs folder.

Interested in contributing?

Have a look at CONTRIBUTING.md.

Who made this

Built by Matt Brown (@muglug).

Maintained by Orklah (@orklah), Daniil Gentili (@danog), and Bruce Weirdan (@weirdan).

The engineering team at Vimeo have provided a lot encouragement, especially @nbeliard, @erunion and @nickyr.

Description
No description provided
Readme MIT 108 MiB
Languages
PHP 100%