Skip to content

Commit

Permalink
Merge pull request #7853 from jrmajor/generator-return
Browse files Browse the repository at this point in the history
Remove `@psalm-generator-return` annotation
  • Loading branch information
orklah committed Apr 13, 2022
2 parents 916fddb + 5717516 commit 0d10280
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/DocComment.php
Expand Up @@ -24,7 +24,7 @@ final class DocComment
'assert', 'assert-if-true', 'assert-if-false', 'suppress',
'ignore-nullable-return', 'override-property-visibility',
'override-method-visibility', 'seal-properties', 'seal-methods',
'generator-return', 'ignore-falsable-return', 'variadic', 'pure',
'ignore-falsable-return', 'variadic', 'pure',
'ignore-variable-method', 'ignore-variable-property', 'internal',
'taint-sink', 'taint-source', 'assert-untainted', 'scope-this',
'mutation-free', 'external-mutation-free', 'immutable', 'readonly',
Expand Down
1 change: 0 additions & 1 deletion tests/DocumentationTest.php
Expand Up @@ -76,7 +76,6 @@ class DocumentationTest extends TestCase
'@psalm-assert-untainted',
'@psalm-consistent-constructor',
'@psalm-flow',
'@psalm-generator-return',
'@psalm-ignore-variable-method',
'@psalm-ignore-variable-property',
'@psalm-override-method-visibility',
Expand Down
14 changes: 0 additions & 14 deletions tests/GeneratorTest.php
Expand Up @@ -53,20 +53,6 @@ function g():Generator { yield new stdClass; }
'$g' => 'Generator<int, stdClass, mixed, mixed>',
],
],
'generatorWithReturn' => [
'code' => '<?php
/**
* @return Generator<int,int>
* @psalm-generator-return string
*/
function fooFoo(int $i): Generator {
if ($i === 1) {
return "bash";
}
yield 1;
}',
],
'generatorSend' => [
'code' => '<?php
/** @return Generator<int, string, DateTimeInterface, void> */
Expand Down

0 comments on commit 0d10280

Please sign in to comment.