divineniiquaye/rade-di

View on GitHub
phpstan.neon.dist

Summary

Maintainability
Test Coverage
includes:
    - vendor/phpstan/phpstan-strict-rules/rules.neon

parameters:
    level: 4
    paths: [src]
    checkGenericClassInNonGenericObjectType: false
    checkMissingIterableValueType: false
    treatPhpDocTypesAsCertain: false

    ignoreErrors:
        - "#^Construct empty\\(\\) is not allowed. Use more strict comparison|Call to an undefined method ReflectionMethod|ReflectionProperty\\:\\:getAttributes\\(\\).$#"
        - "#^Property Rade\\\\DI\\\\Loader\\\\FileLoader\\:\\:\\$container \\(Rade\\\\DI\\\\Container\\|Rade\\\\DI\\\\ContainerBuilder\\) does not accept Rade\\\\DI\\\\AbstractContainer.$#"
        -
            message: "#^Parameter \\#2 \\$service \\(Rade\\\\DI\\\\Definition\\|Rade\\\\DI\\\\RawDefinition\\) of method Rade\\\\DI\\\\ContainerBuilder\\:\\:doCreate\\(\\) should be contravariant with parameter \\$service \\(callable\\(\\): mixed\\) of method Rade\\\\DI\\\\AbstractContainer\\:\\:doCreate\\(\\)$#"
            path: src/ContainerBuilder.php
        -
            message: "#^Rade\\\\DI\\\\ContainerBuilder\\:\\:__construct\\(\\) does not call parent constructor from Rade\\\\DI\\\\AbstractContainer.$#"
            path: src/ContainerBuilder.php
        -
            message: "#^Parameter \\#1 \\$offset (string) of method Rade\\\\DI\\\\Container\\:\\:offset|Set|Get|Exists|Unset\\(\\) should be contravariant with parameter \\$offset (mixed) of method ArrayAccess<mixed,mixed>\\:\\:offset|Set|Get|Exists|Unset\\(\\)|Variable method call on \\$this\\(Rade\\\\DI\\\\Container\\).|Call to function is_callable\\(\\) with mixed will always evaluate to false.$#"
            path: src/Container.php
        -
            message: '#^Invalid type Psr\\Container\\(NotFound|Container)ExceptionInterface to throw|Only booleans are allowed in a ternary operator condition, ReflectionType\|null given.$#'
            path: src/Services/ServiceLocator.php
        -
            message: "#^Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.|PHPDoc tag @param references unknown parameter: (\\$message|\\$package|\\$version)|Variable property access on \\$this\\(Rade\\\\DI\\\\Definition\\).$#"
            path: src/Definition.php
        -
            message: "#^Variable property access on object|Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.$#"
            path: src/Resolvers/Resolver.php
        -
            message: "#^Variable property|method access|call on object|PhpParser\\\\BuilderFactory|Unreachable statement - code above always terminates|Access to an undefined property PhpParser\\\\Node\\\\Expr\\:\\:\\$dim|Call to an undefined method Psr\\\\Container\\\\ContainerInterface\\:\\:resolveClass\\(\\)|Method Rade\\\\DI\\\\AbstractContainer\\:\\:resolveClass\\(\\) invoked with 3 parameters, 1-2 required.$#"
            path: src/Traits/ResolveTrait.php
        -
            message: "#^Call to an undefined static method Rade\\\\DI\\\\Services\\\\ServiceProviderInterface\\:\\:getId\\(\\).$#"
            path: src/AbstractContainer.php
        -
            message: "#^Variable \\$excludePattern might not be defined.|Call to function is_scalar\\(\\) with mixed will always evaluate to true.$#"
            path: src/Loader/FileLoader.php
        -
            message: "#^Instanceof between \\*NEVER\\* and Symfony\\\\Component\\\\Yaml\\\\Tag\\\\TaggedValue will always evaluate to false.$#"
            path: src/Loader/YamlFileLoader.php