includes:
    - ./vendor/larastan/larastan/extension.neon
    - ./vendor/phpstan/phpstan-mockery/extension.neon

parameters:

    stubFiles:
        - tests/stub/phpstan/TestResponse.stub
        - tests/stub/phpstan/Settings.stub

    paths:
        - app
        - tests
        - database
        - packages/tex/src
        - packages/laravel-nami/src
        - packages/laravel-nami/tests

    # The level 8 is the highest level
    level: 6

    typeAliases:
        ContributionMemberData: 'array<string, mixed>'
        ContributionRequestArray: 'array{dateFrom: string, dateUntil: string, zipLocation: string, country: int, eventName: string, members: array<int, int>}'
        ContributionApiRequestArray: 'array{dateFrom: string, dateUntil: string, zipLocation: string, country: int, eventName: string, member_data: array<int, ContributionMemberData>}'
        MailgatewayCustomField: 'array{name: string, label: string, type: string, storeValidator: string, updateValidator: string, default: string}'
        MailgatewayParsedCustomField: 'array{name: string, label: string, type: string, storeValidator: string, updateValidator: string, default: string, is_required: bool}'
        SluggableConfig: 'array<string, array{source: array<int, string>}>'
        AddressBookCard: 'array{lastmodified: int, etag: string, uri: string, id: int, size: int}'

    ignoreErrors:
        -
            message: "#^Method App\\\\Activity\\:\\:sluggable\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Activity.php

        -
            message: "#^Method App\\\\Http\\\\Controllers\\\\Auth\\\\RegisterController\\:\\:create\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Http/Controllers/Auth/RegisterController.php

        -
            message: "#^Method App\\\\Http\\\\Controllers\\\\Auth\\\\RegisterController\\:\\:validator\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Http/Controllers/Auth/RegisterController.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Document\\:\\:\\$ADR\\.$#"
            count: 1
            path: app/Member/Member.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Document\\:\\:\\$BDAY\\.$#"
            count: 1
            path: app/Member/Member.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Document\\:\\:\\$N\\.$#"
            count: 1
            path: app/Member/Member.php

        -
            message: "#^Unsafe usage of new static\\(\\)\\.$#"
            count: 1
            path: app/Member/Member.php

        -
            message: "#^Method App\\\\Member\\\\MemberRequest\\:\\:rules\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Member/MemberRequest.php

        -
            message: "#^Method App\\\\Membership\\\\MembershipResource\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Membership/MembershipResource.php

        -
            message: "#^Method App\\\\Payment\\\\SubscriptionResource\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: app/Payment/SubscriptionResource.php

        -
            message: "#^Method Database\\\\Factories\\\\ActivityFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: database/factories/ActivityFactory.php

        -
            message: "#^Method Database\\\\Factories\\\\ConfessionFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: database/factories/ConfessionFactory.php

        -
            message: "#^Method Database\\\\Factories\\\\CountryFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: database/factories/CountryFactory.php

        -
            message: "#^Method Database\\\\Factories\\\\FeeFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: database/factories/FeeFactory.php

        -
            message: "#^Method Database\\\\Factories\\\\NationalityFactory\\:\\:definition\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: database/factories/NationalityFactory.php

        -
            message: "#^Parameter \\#1 \\$api of class App\\\\Initialize\\\\InitializeGroups constructor expects Zoomyboy\\\\LaravelNami\\\\Api, PHPUnit\\\\Framework\\\\MockObject\\\\Stub given\\.$#"
            count: 6
            path: tests/Unit/InitializeGroupsTest.php

        -
            message: "#^Method Tests\\\\Unit\\\\Mailman\\\\ServiceTest\\:\\:testItReturnsMoreThanOneResult\\(\\) has parameter \\$totals with no value type specified in iterable type array\\.$#"
            count: 1
            path: tests/Unit/Mailman/ServiceTest.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Confession\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Confession.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Confession\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Confession.php

        -
            message: "#^Unable to resolve the template type TKey in call to function collect$#"
            count: 1
            path: packages/laravel-nami/src/Confession.php

        -
            message: "#^Unable to resolve the template type TValue in call to function collect$#"
            count: 1
            path: packages/laravel-nami/src/Confession.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Country\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Country.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Country\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Country.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\BausteinFake\\:\\:fetches\\(\\) has parameter \\$courses with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/BausteinFake.php

        -
            message: "#^PHPDoc tag @param references unknown parameter\\: \\$memberId$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/BausteinFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\Fake\\:\\:dataResponse\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/Fake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\GroupFake\\:\\:fakeResponse\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/GroupFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\GroupFake\\:\\:mapToResponse\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/GroupFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\GroupFake\\:\\:mapToResponse\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/GroupFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\MembershipFake\\:\\:assertCreated\\(\\) has parameter \\$payload with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/MembershipFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fakes\\\\MembershipFake\\:\\:assertUpdated\\(\\) has parameter \\$payload with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fakes/MembershipFake.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fee\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fee.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Fee\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Fee.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Gender\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Gender.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Gender\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Gender.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Gender\\:\\:getIsNullAttribute\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Gender.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Gender\\:\\:getNullValue\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Gender.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:setReason\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:setReason\\(\\) has parameter \\$reason with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:setResponse\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:setResponse\\(\\) has parameter \\$response with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Property Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:\\$reason has no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Property Zoomyboy\\\\LaravelNami\\\\LoginException\\:\\:\\$response has no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/LoginException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:getData\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:request\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:response\\(\\) has parameter \\$response with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:setData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Property Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:\\$data type has no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Property Zoomyboy\\\\LaravelNami\\\\NamiException\\:\\:\\$response type has no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/src/NamiException.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Nationality\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Nationality.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Nationality\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Nationality.php

        -
            message: "#^Unable to resolve the template type TKey in call to function collect$#"
            count: 1
            path: packages/laravel-nami/src/Nationality.php

        -
            message: "#^Unable to resolve the template type TValue in call to function collect$#"
            count: 1
            path: packages/laravel-nami/src/Nationality.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Nullable\\:\\:getIsNullAttribute\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Nullable.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Nullable\\:\\:getNullValue\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Nullable.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Providers\\\\NamiServiceProvider\\:\\:boot\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Providers/NamiServiceProvider.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Region\\:\\:fromNami\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Region.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Region\\:\\:fromNami\\(\\) has parameter \\$item with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Region.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Region\\:\\:getIsNullAttribute\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Region.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Region\\:\\:getNullValue\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/src/Region.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Tests\\\\Stub\\\\Member\\:\\:findByNamiId\\(\\) has no return type specified\\.$#"
            count: 1
            path: packages/laravel-nami/tests/Stub/Member.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Tests\\\\Stub\\\\Member\\:\\:findByNamiId\\(\\) has parameter \\$id with no type specified\\.$#"
            count: 1
            path: packages/laravel-nami/tests/Stub/Member.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Tests\\\\TestCase\\:\\:fakeJson\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/tests/TestCase.php

        -
            message: "#^Method Zoomyboy\\\\LaravelNami\\\\Tests\\\\TestCase\\:\\:getAnnotations\\(\\) return type has no value type specified in iterable type array\\.$#"
            count: 1
            path: packages/laravel-nami/tests/TestCase.php

        -
            message: "#^Parameter \\#1 \\$mock of static method Phake\\:\\:verify\\(\\) expects Phake\\\\IMock, App\\\\Actions\\\\PullMemberAction given\\.$#"
            count: 1
            path: tests/Feature/Member/NamiPutMemberActionTest.php

        -
            message: "#^Parameter \\#1 \\$mock of static method Phake\\:\\:verify\\(\\) expects Phake\\\\IMock, App\\\\Actions\\\\PullMembershipsAction given\\.$#"
            count: 1
            path: tests/Feature/Member/NamiPutMemberActionTest.php

        -
            message: "#^Call to an undefined method Mockery\\\\ExpectationInterface\\|Mockery\\\\HigherOrderMessage\\:\\:once\\(\\)\\.$#"
            count: 2
            path: tests/Feature/Member/ResyncTest.php

        -
            message: "#^Method App\\\\Region\\:\\:forSelect\\(\\) should return Illuminate\\\\Support\\\\Collection\\<int, array\\{id\\: int, name\\: string\\}\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Region\\>\\.$#"
            count: 1
            path: app/Region.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Component\\\\VCard\\:\\:\\$BDAY\\.$#"
            count: 2
            path: tests/Feature/Member/DavTest.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Component\\\\VCard\\:\\:\\$FN\\.$#"
            count: 1
            path: tests/Feature/Member/DavTest.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Component\\\\VCard\\:\\:\\$N\\.$#"
            count: 1
            path: tests/Feature/Member/DavTest.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Component\\\\VCard\\:\\:\\$TEL\\.$#"
            count: 1
            path: tests/Feature/Member/DavTest.php

        -
            message: "#^Access to an undefined property Sabre\\\\VObject\\\\Component\\\\VCard\\:\\:\\$UID\\.$#"
            count: 1
            path: tests/Feature/Member/DavTest.php

        -
            message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$email\\.$#"
            count: 2
            path: app/Maildispatcher/Actions/ResyncAction.php

        -
            message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$email_parents\\.$#"
            count: 2
            path: app/Maildispatcher/Actions/ResyncAction.php

        -
            message: "#^Unable to resolve the template type TKey in call to function collect$#"
            count: 2
            path: app/Mailgateway/Actions/StoreAction.php

        -
            message: "#^Unable to resolve the template type TValue in call to function collect$#"
            count: 2
            path: app/Mailgateway/Actions/StoreAction.php

        -
            message: "#^Unable to resolve the template type TKey in call to function collect$#"
            count: 2
            path: app/Mailgateway/Actions/UpdateAction.php

        -
            message: "#^Unable to resolve the template type TValue in call to function collect$#"
            count: 2
            path: app/Mailgateway/Actions/UpdateAction.php

        -
            message: "#^Return type of call to method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:map\\(\\) contains unresolvable type\\.$#"
            count: 1
            path: app/Mailgateway/Resources/MailgatewayResource.php

        -
            message: "#^Generic type Illuminate\\\\Pagination\\\\LengthAwarePaginator\\<int, App\\\\Member\\\\Member\\> in PHPDoc tag @return specifies 2 template types, but class Illuminate\\\\Pagination\\\\LengthAwarePaginator supports only 1\\: TValue$#"
            count: 1
            path: app/Member/Actions/SearchAction.php

        -
            message: "#^Class Plugins\\\\Test\\\\ServiceProvider not found\\.$#"
            count: 1
            path: tests/Unit/Plugin/PluginTest.php

        -
            message: "#^Using nullsafe property access on non\\-nullable type App\\\\Invoice\\\\BillKind\\. Use \\-\\> instead\\.$#"
            count: 1
            path: app/Member/Member.php

        -
            message: "#^Method App\\\\Member\\\\FilterScope\\:\\:combinations\\(\\) should return Illuminate\\\\Support\\\\Collection\\<int, array\\<int, int\\>\\> but returns Illuminate\\\\Support\\\\Collection\\<int, Illuminate\\\\Support\\\\Collection\\<int, int\\>\\>\\.$#"
            count: 1
            path: app/Member/FilterScope.php

        -
            message: "#^Parameter \\#1 \\.\\.\\.\\$parts of method App\\\\Member\\\\FilterScope\\:\\:combinations\\(\\) expects array\\<int, int\\>, array\\<int, array\\<int, int\\>\\> given\\.$#"
            count: 1
            path: app/Member/FilterScope.php

        -
            message: "#^Unable to resolve the template type TKey in call to function collect$#"
            count: 1
            path: app/Form/Fields/NamiField.php

        -
            message: "#^Unable to resolve the template type TValue in call to function collect$#"
            count: 1
            path: app/Form/Fields/NamiField.php

        -
            message: "#^Method App\\\\Fileshare\\\\ConnectionTypes\\\\ConnectionType\\:\\:types\\(\\) should return Illuminate\\\\Support\\\\Collection\\<int, class\\-string\\<App\\\\Fileshare\\\\ConnectionTypes\\\\ConnectionType\\>\\> but returns Illuminate\\\\Support\\\\Collection\\<int, string\\>\\.$#"
            count: 1
            path: app/Fileshare/ConnectionTypes/ConnectionType.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:check\\(\\)\\.$#"
            count: 1
            path: tests/Feature/Mailgateway/IndexTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:setCredentials\\(\\)\\.$#"
            count: 1
            path: tests/Feature/Mailgateway/IndexTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:check\\(\\)\\.$#"
            count: 2
            path: tests/Feature/Mailgateway/MailmanTypeTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:setCredentials\\(\\)\\.$#"
            count: 2
            path: tests/Feature/Mailgateway/MailmanTypeTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:setOwner\\(\\)\\.$#"
            count: 1
            path: tests/Feature/Mailgateway/MailmanTypeTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:setOwner\\(\\)\\.$#"
            count: 2
            path: tests/Feature/Mailgateway/StoreTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:setParams\\(\\)\\.$#"
            count: 3
            path: tests/Feature/Mailgateway/StoreTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\StubberProxy\\:\\:works\\(\\)\\.$#"
            count: 3
            path: tests/Feature/Mailgateway/StoreTest.php

        -
            message: "#^Call to an undefined method Phake\\\\Proxies\\\\VerifierProxy\\:\\:handle\\(\\)\\.$#"
            count: 2
            path: tests/Feature/Member/NamiPutMemberActionTest.php