diff --git a/src/Psalm/Config/Creator.php b/src/Psalm/Config/Creator.php index 633211c30..dc7cee624 100644 --- a/src/Psalm/Config/Creator.php +++ b/src/Psalm/Config/Creator.php @@ -181,7 +181,6 @@ class Creator ); } - /** @psalm-suppress MixedAssignment */ if (!$composer_json = json_decode(file_get_contents($composer_json_location), true)) { throw new ConfigCreationException('Invalid composer.json at ' . $composer_json_location); } diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php index 71112982c..7f8a82f68 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php @@ -281,7 +281,6 @@ class TryAnalyzer // discard all clauses because crazy stuff may have happened in try block $catch_context->clauses = []; - /** @psalm-suppress RedundantConditionGivenDocblockType */ if ($catch->var && is_string($catch->var->name)) { $catch_var_id = '$' . $catch->var->name; diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php index 64daf09d1..aa6d45379 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/ArgumentAnalyzer.php @@ -1205,7 +1205,6 @@ class ArgumentAnalyzer $context->vars_in_scope[$var_id] = new Type\Union([$unpacked_atomic_array]); } elseif ($unpacked_atomic_array instanceof Type\Atomic\TArray) { $unpacked_atomic_array = clone $unpacked_atomic_array; - /** @psalm-suppress PropertyTypeCoercion */ $unpacked_atomic_array->type_params[1] = $input_type; $context->vars_in_scope[$var_id] = new Type\Union([$unpacked_atomic_array]); diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php index 40d369e43..dee947126 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php @@ -653,7 +653,6 @@ class ArrayFetchAnalyzer && $offset_as->param_name === $original_type->param_name && $offset_as->defining_class === $original_type->defining_class ) { - /** @psalm-suppress PropertyTypeCoercion */ $type->type_params[1] = new Type\Union([ new Type\Atomic\TTemplateIndexedAccess( $offset_as->param_name, @@ -740,7 +739,6 @@ class ArrayFetchAnalyzer } if ($in_assignment && $replacement_type) { - /** @psalm-suppress PropertyTypeCoercion */ $type->type_params[1] = Type::combineUnionTypes( $type->type_params[1], $replacement_type, diff --git a/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php index 79253c6e1..9961a0724 100644 --- a/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php @@ -572,7 +572,6 @@ class ReturnAnalyzer ->getCodebase() ->getFunctionLikeStorage($statements_analyzer, $closure_id); - /** @psalm-suppress ArgumentTypeCoercion */ $parent_fn_storage = $statements_analyzer ->getCodebase() ->getFunctionLikeStorage( diff --git a/src/Psalm/Internal/Codebase/Populator.php b/src/Psalm/Internal/Codebase/Populator.php index b3a0cc54b..9240bfdfb 100644 --- a/src/Psalm/Internal/Codebase/Populator.php +++ b/src/Psalm/Internal/Codebase/Populator.php @@ -185,7 +185,6 @@ class Populator && !$storage->is_interface && !$storage->is_trait ) { - /** @psalm-suppress PropertyTypeCoercion */ $storage->methods['__construct'] = $storage->methods[$fq_classlike_name_lc]; } @@ -1144,9 +1143,7 @@ class Populator } } - /** @psalm-suppress PropertyTypeCoercion */ $storage->declaring_method_ids[$aliased_method_name] = $declaring_method_id; - /** @psalm-suppress PropertyTypeCoercion */ $storage->inheritable_method_ids[$aliased_method_name] = $declaring_method_id; } } diff --git a/src/Psalm/Internal/Codebase/Reflection.php b/src/Psalm/Internal/Codebase/Reflection.php index 25d8c9d4d..22039d0d2 100644 --- a/src/Psalm/Internal/Codebase/Reflection.php +++ b/src/Psalm/Internal/Codebase/Reflection.php @@ -65,7 +65,6 @@ class Reflection $storage->abstract = $reflected_class->isAbstract(); $storage->is_interface = $reflected_class->isInterface(); - /** @psalm-suppress PropertyTypeCoercion */ $storage->potential_declaring_method_ids['__construct'][$class_name_lower . '::__construct'] = true; if ($reflected_parent_class) { diff --git a/src/Psalm/Internal/Fork/Pool.php b/src/Psalm/Internal/Fork/Pool.php index 2fbff4290..e88c199f0 100644 --- a/src/Psalm/Internal/Fork/Pool.php +++ b/src/Psalm/Internal/Fork/Pool.php @@ -217,7 +217,6 @@ class Pool } catch (\Throwable $t) { // This can happen when developing Psalm from source without running `composer update`, // or because of rare bugs in Psalm. - /** @psalm-suppress MixedArgument on Windows, for some reason */ $process_done_message = new ForkProcessErrorMessage( $t->getMessage() . "\nStack trace in the forked worker:\n" . $t->getTraceAsString() ); diff --git a/src/Psalm/Internal/PhpVisitor/OffsetShifterVisitor.php b/src/Psalm/Internal/PhpVisitor/OffsetShifterVisitor.php index 8a729d692..1503a6d51 100644 --- a/src/Psalm/Internal/PhpVisitor/OffsetShifterVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/OffsetShifterVisitor.php @@ -54,9 +54,7 @@ class OffsetShifterVisitor extends PhpParser\NodeVisitorAbstract * @psalm-suppress MixedOperand */ $node->setAttribute('startFilePos', $attrs['startFilePos'] + $this->file_offset); - /** @psalm-suppress MixedOperand */ $node->setAttribute('endFilePos', $attrs['endFilePos'] + $this->file_offset); - /** @psalm-suppress MixedOperand */ $node->setAttribute('startLine', $attrs['startLine'] + $this->line_offset); } } diff --git a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php index e2920ece6..0f2766362 100644 --- a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php @@ -216,7 +216,6 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract if ($error->hasColumnInfo()) { /** @var array{startFilePos: int, endFilePos: int} */ $error_attrs = $error->getAttributes(); - /** @psalm-suppress MixedOperand */ $error = new PhpParser\Error( $error->getRawMessage(), [ @@ -297,7 +296,6 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract $node->setAttribute('comments', $new_comments); - /** @psalm-suppress MixedOperand */ $node->setAttribute('startFilePos', $attrs['startFilePos'] + $start_offset); } else { $node->setAttribute('startFilePos', $stmt_start_pos + $start_offset); @@ -309,7 +307,6 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract } if ($line_offset !== 0) { - /** @psalm-suppress MixedOperand */ $node->setAttribute('startLine', $attrs['startLine'] + $line_offset); } diff --git a/src/Psalm/Internal/PluginManager/ComposerLock.php b/src/Psalm/Internal/PluginManager/ComposerLock.php index cd48e2f88..105e5b0e5 100644 --- a/src/Psalm/Internal/PluginManager/ComposerLock.php +++ b/src/Psalm/Internal/PluginManager/ComposerLock.php @@ -57,7 +57,6 @@ class ComposerLock private function read(string $file_name): array { - /** @psalm-suppress MixedAssignment */ $contents = json_decode(file_get_contents($file_name), true); if ($error = json_last_error()) { diff --git a/src/Psalm/Internal/Provider/NodeDataProvider.php b/src/Psalm/Internal/Provider/NodeDataProvider.php index d70f91fa4..54718dc98 100644 --- a/src/Psalm/Internal/Provider/NodeDataProvider.php +++ b/src/Psalm/Internal/Provider/NodeDataProvider.php @@ -30,13 +30,9 @@ class NodeDataProvider implements \Psalm\NodeTypeProvider public function __construct() { - /** @psalm-suppress PropertyTypeCoercion */ $this->node_types = new SplObjectStorage(); - /** @psalm-suppress PropertyTypeCoercion */ $this->node_assertions = new SplObjectStorage(); - /** @psalm-suppress PropertyTypeCoercion */ $this->node_if_true_assertions = new SplObjectStorage(); - /** @psalm-suppress PropertyTypeCoercion */ $this->node_if_false_assertions = new SplObjectStorage(); } diff --git a/src/Psalm/Internal/Provider/ParserCacheProvider.php b/src/Psalm/Internal/Provider/ParserCacheProvider.php index 931631ff9..7964a45a6 100644 --- a/src/Psalm/Internal/Provider/ParserCacheProvider.php +++ b/src/Psalm/Internal/Provider/ParserCacheProvider.php @@ -191,7 +191,6 @@ class ParserCacheProvider return []; } - /** @psalm-suppress MixedAssignment */ $hashes_decoded = json_decode($hashes_encoded, true); if (!is_array($hashes_decoded)) { diff --git a/src/Psalm/Internal/Scope/CaseScope.php b/src/Psalm/Internal/Scope/CaseScope.php index bad6dc994..220ac60e5 100644 --- a/src/Psalm/Internal/Scope/CaseScope.php +++ b/src/Psalm/Internal/Scope/CaseScope.php @@ -26,7 +26,6 @@ class CaseScope public function __destruct() { - /** @psalm-suppress PossiblyNullPropertyAssignmentValue */ $this->parent_context = null; } } diff --git a/src/Psalm/IssueBuffer.php b/src/Psalm/IssueBuffer.php index a3c32aaf9..57bcde596 100644 --- a/src/Psalm/IssueBuffer.php +++ b/src/Psalm/IssueBuffer.php @@ -517,7 +517,6 @@ class IssueBuffer } } - /** @psalm-suppress PropertyTypeCoercion due to Psalm bug */ $issues_data[$file_path][$key] = $issue_data; } }