Download the PHP package orklah/psalm-strict-numeric-cast without Composer
On this page you can find all versions of the php package orklah/psalm-strict-numeric-cast. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download orklah/psalm-strict-numeric-cast
More information about orklah/psalm-strict-numeric-cast
Files in orklah/psalm-strict-numeric-cast
Download orklah/psalm-strict-numeric-cast
More information about orklah/psalm-strict-numeric-cast
Files in orklah/psalm-strict-numeric-cast
Vendor orklah
Package psalm-strict-numeric-cast
Short Description Restrict the use of (int) and (float) to numeric-string only
License MIT
Package psalm-strict-numeric-cast
Short Description Restrict the use of (int) and (float) to numeric-string only
License MIT
Please rate this library. Is it a good library?
Informations about the package psalm-strict-numeric-cast
psalm-strict-numeric-cast
A Psalm plugin to restrict the use of (int) and (float) to numeric-string only
Installation:
Usage:
Run your usual Psalm command:
Explanation:
This plugin aims to avoid code like this:
This cast is performed on a string that could have any value from a static analysis point of view.
The issue can be resolved in a few ways that will force you to have a better confidence in your variables types.
-
You can check that the variable is indeed numeric:
- You can make psalm understand that the function expects a numeric (this will force you to correctly type any input to this function):
All versions of psalm-strict-numeric-cast with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.3|^8.0
ext-simplexml Version *
ext-simplexml Version *
The package orklah/psalm-strict-numeric-cast contains the following files
Loading the files please wait ....