Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 272 Bytes

UnnecessaryVarAnnotation.md

File metadata and controls

14 lines (10 loc) · 272 Bytes

UnnecessaryVarAnnotation

Emitted when --find-dead-code is turned on and you're using a @var annotation on an assignment that Psalm has already identified a type for.

<?php

function foo() : string {
    return "hello";
}

/** @var string */
$a = foo();