Help wantedbugeasy problemsgood first issue
Description
For the following config
<?xml version="1.0"?>
<psalm
errorLevel="5"
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"
findUnusedBaselineEntry="false"
findUnusedCode="false"
usePhpDocPropertiesWithoutMagicCall="true"
reportMixedIssues="true"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedArgument errorLevel="error" />
<MixedAssignment errorLevel="error" />
<MixedPropertyAssignment errorLevel="error" />
</issueHandlers>
</psalm>
running psalm for this code
<?php
/**
* Safely access the values in $this->params.
*
* @param string $name The name or dotted path to parameter.
* @param mixed $default The default value if `$name` is not set. Default `null`.
* @return mixed
*/
function getParam(string $name, $default = null)
{
if ($name && $default) {} // suppress unused name warnings
return null;
}
$type = getParam('type');
$type = strtolower($type);
echo $type;
I would expect the same errors to be reported as seen on https://psalm.dev/r/34a696dcc4
yet I get No errors found!.