parameters:
    level: 6
    tmpDir: /var/www/social/var/cache/phpstan
    inferPrivatePropertyTypeFromConstructor: true
    bootstrapFiles:
        - config/bootstrap.php
    paths:
        - src
        - tests
        - components
        - plugins
    excludePaths:
        - plugins/ActivityPub
        - plugins/Poll
        - components/FreeNetwork
        - tests/CodeCeption/_support/
    earlyTerminatingMethodCalls:
        App\Core\Log:
            - unexpected_exception
    typeAliases:
        ControllerResultType: '(array{_template: string} | array{_redirect: string}) & array<string, mixed>'
        CacheKeysType: 'array<string, string>'
        SettingsTabsType: 'array<array{title: string, desc: string, id: string, controller: ControllerResultType}>'
        OrderByType: "'ASC' | 'DESC' | 'asc' | 'desc'"
        ModuleVersionType: 'array{name: string, version: string, author: string, rawdescription: string}'

    ignoreErrors:
        -
            message: '/Access to an undefined property App\\Util\\Bitmap::\$\w+/'
            paths:
                - *

        -
            message: '/^Property App\\PHPStan\\ClassFromTableNameDynamicStaticMethodReturnTypeExtension::\$provider is never read, only written\./'
            path: src/PHPStan/ClassFromTableNameDynamicStaticMethodReturnTypeExtension.php

        -
            message: '/Parameter \$I of method [a-zA-Z]+::[a-zA-Z_]+\(\) has invalid type AcceptanceTester\./'
            paths:
                - *

        -
            message: '/Call to method [a-zA-Z]+\(\) on an unknown class AcceptanceTester\./'
            paths:
                - *

        -
            message: '/::onCollectionQueryCreateExpression\(\) has parameter \$(actor|note)_expr with no type specified\./'
            paths:
                - *

        -
            message: '/::schemaDef\(\) return type has no value type specified in iterable type array\./'
            paths:
                - *

        -
            message: '/has no return type specified\./'
            paths:
                - *

        -
            message: '/with no value type specified in iterable type (array|iterable)\.|type has no value type specified in iterable type (array|iterable)\./'
            paths:
                - *

        -
            message: '/never returns array{_redirect: string} so it can be removed from the return type\./'
            paths:
                - *

        -
            message: '/but returns array<string, array<int, mixed>\|string>\./'
            paths:
                - plugins/AttachmentCollections/Controller/AttachmentCollections.php
                - plugins/Bundles/Controller/BundleCollection.php

        -
            message: '/has parameter \$.+ with no type specified./'
            paths:
                - tests/*

services:
    -
        class: App\PHPStan\ClassFromTableNameDynamicStaticMethodReturnTypeExtension
        tags:
            - phpstan.broker.dynamicStaticMethodReturnTypeExtension

    -
        class: App\PHPStan\GNUsocialProvider
