From e938e735499064f460987578daeaa89b47936b60 Mon Sep 17 00:00:00 2001 From: Brown Date: Sun, 23 Aug 2020 18:53:34 -0400 Subject: [PATCH] Add a couple more pure annotations --- src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php | 3 +++ src/Psalm/Internal/PluginManager/ComposerLock.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php index ff39e6f87..1d3fea84b 100644 --- a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php @@ -325,6 +325,9 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract implements PhpP return $this->must_rescan || $this->non_method_changes; } + /** + * @psalm-pure + */ private function balanceBrackets(string $fake_class) : string { $tokens = \token_get_all($fake_class); diff --git a/src/Psalm/Internal/PluginManager/ComposerLock.php b/src/Psalm/Internal/PluginManager/ComposerLock.php index 4fb396996..e8fc2c873 100644 --- a/src/Psalm/Internal/PluginManager/ComposerLock.php +++ b/src/Psalm/Internal/PluginManager/ComposerLock.php @@ -23,7 +23,10 @@ class ComposerLock /** * @param mixed $package + * * @psalm-assert-if-true array $package + * + * @psalm-pure */ public function isPlugin($package): bool {