<?xml version="1.0"?>
<psalm
        errorLevel="1"
        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"
        findUnusedPsalmSuppress="true"
        errorBaseline="psalm-baseline.xml"
>
    <projectFiles>
        <directory name="src"/>
        <directory name="test"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>

    <extraFiles>
        <file name="test/Reflection/TestAsset/FileOfFunctions.php"/>
        <file name="test/Reflection/TestAsset/functions.php"/>
    </extraFiles>

    <issueHandlers>
        <InternalClass>
            <errorLevel type="suppress">
                <!-- the scanner internal component can be used by package internals -->
                <referencedClass name="Laminas\Code\Generic\Prototype\PrototypeClassFactory"/>
                <referencedClass name="Laminas\Code\Scanner\DocBlockScanner"/>
            </errorLevel>
        </InternalClass>

        <InternalMethod>
            <errorLevel type="suppress">
                <referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::method"/>
                <referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::willReturn"/>
                <referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::with"/>
            </errorLevel>

            <!-- the scanner internal component can be used by package internals -->
            <errorLevel type="suppress">
                <referencedMethod name="Laminas\Code\Generic\Prototype\PrototypeClassFactory::addPrototype"/>
                <referencedMethod name="Laminas\Code\Generic\Prototype\PrototypeClassFactory::getClonedPrototype"/>
                <referencedMethod name="Laminas\Code\Generic\Prototype\PrototypeClassFactory::setGenericPrototype"/>
                <referencedMethod name="Laminas\Code\Generic\Prototype\PrototypeInterface::getName"/>
                <referencedMethod name="Laminas\Code\Scanner\DocBlockScanner::getLongDescription"/>
                <referencedMethod name="Laminas\Code\Scanner\DocBlockScanner::getShortDescription"/>
                <referencedMethod name="Laminas\Code\Scanner\DocBlockScanner::getTags"/>
            </errorLevel>
        </InternalMethod>

        <UndefinedAttributeClass>
            <errorLevel type="suppress">
                <!-- This class has been added in PHP 8.1 and Psalm does not know it yet. -->
                <referencedClass name="ReturnTypeWillChange"/>
            </errorLevel>
        </UndefinedAttributeClass>
    </issueHandlers>
    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
    </plugins>
</psalm>
