VarInlineAnnotationToAssertRector currently replace @var phpdoc with assertion on the same line. This will lead to a failed assertion because variable is usually defined on the line below and is thus undefined at the time of assert.
Therefore line containing the variable definiton and assertion should be swapped.
Also code sample in this rector is invalid - there's a method call on an undefined variable that would result in error.
VarInlineAnnotationToAssertRector currently replace @var phpdoc with assertion on the same line. This will lead to a failed assertion because variable is usually defined on the line below and is thus undefined at the time of assert.
Therefore line containing the variable definiton and assertion should be swapped.
Also code sample in this rector is invalid - there's a method call on an undefined variable that would result in error.