Files
php-curl-class/tests/psalm.xml
T
Zach Borboa bd793d1287 Increase Psalm strictness (#909)
* Increase Psalm strictness

* Fix static analysis errors

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:91:16 - Redundant cast to bool (see https://psalm.dev/262)
        return (bool) array_key_exists(strtolower($offset), $this->data);

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:138:16 - Redundant cast to int<0, max> (see https://psalm.dev/262)
        return (int) count($this->data);

ERROR: RedundantCast - ../src/Curl/CaseInsensitiveArray.php:187:16 - Redundant cast to bool (see https://psalm.dev/262)
        return (bool) (key($this->data) !== null);

ERROR: ForbiddenCode - ../src/Curl/Curl.php:1765:13 - Unsafe var_dump (see https://psalm.dev/002)
            var_dump($value);

ERROR: ForbiddenCode - ../src/Curl/Curl.php:1770:13 - Unsafe var_dump (see https://psalm.dev/002)
            var_dump($value);

ERROR: InvalidOperand - ../src/Curl/Curl.php:1816:35 - Cannot concatenate with a value-of<TArray> (see https://psalm.dev/058)
                return $k . '=' . $v;
2025-01-11 23:11:26 -05:00

34 lines
1.1 KiB
XML

<?xml version="1.0"?>
<!-- TODO: Use errorLevel="1" -->
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="../src" />
<ignoreFiles>
<directory name="../vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="CurlHandle" />
<file name="../src/Curl/Curl.php" />
</errorLevel>
<errorLevel type="suppress">
<referencedClass name="CurlMultiHandle" />
<file name="../src/Curl/MultiCurl.php" />
</errorLevel>
<errorLevel type="suppress">
<referencedClass name="CURLStringFile" />
<file name="../src/Curl/ArrayUtil.php" />
</errorLevel>
</UndefinedClass>
</issueHandlers>
</psalm>