Skip to content

Issues found by Psalm in DocBlock class #3861

Closed
@sebastianbergmann

Description

@sebastianbergmann
./tools/psalm --config=.psalm/config.xml --no-progress --show-info=false

ERROR: ImpureMethodCall - src/Util/Annotation/DocBlock.php:194:67 - Cannot call an possibly-mutating method PharIo\Version\VersionConstraintParser::parse from a mutation-free context
                        'constraint' => $versionConstraintParser->parse(\trim($matches['constraint'])),


ERROR: ImpurePropertyAssignment - src/Util/Annotation/DocBlock.php:229:16 - Cannot assign to a property from a mutation-free context
        return $this->parsedRequirements = \array_merge(


ERROR: InaccessibleProperty - src/Util/Annotation/DocBlock.php:229:16 - PHPUnit\Util\Annotation\DocBlock::$parsedRequirements is marked readonly
        return $this->parsedRequirements = \array_merge(


ERROR: ImpureFunctionCall - src/Util/Annotation/DocBlock.php:508:17 - Cannot call an impure function from a mutation-free context
            if (\json_last_error() !== \JSON_ERROR_NONE) {


ERROR: ImpureFunctionCall - src/Util/Annotation/DocBlock.php:510:86 - Cannot call an impure function from a mutation-free context
                    'The data set for the @testWith annotation cannot be parsed: ' . \json_last_error_msg()


ERROR: ImpureFunctionCall - src/Util/Annotation/DocBlock.php:560:20 - Cannot call an impure function from a mutation-free context
                ...\array_map(


------------------------------
6 errors found
------------------------------

Checks took 6.75 seconds and used 178.593MB of memory
Psalm was able to infer types for 91.0467% of the codebase

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions