Skip to content

Add return types - batch 1/n #42504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2021
Merged

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 12, 2021

Q A
Branch? 6.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets #40154
License MIT
Doc PR -

Extracted from #42496 for components that shouldn't be extended very often.

@nicolas-grekas
Copy link
Member Author

📗 (psalm failure are false-positives here.)

*/
public static function create(string $file, CacheItemPoolInterface $fallbackPool)
public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static function create(string $file, CacheItemPoolInterface $fallbackPool): CacheItemPoolInterface
public static function create(string $file, CacheItemPoolInterface $fallbackPool): static

I don't quite understand why the previously annotated return type was so wide, tbh.

@nicolas-grekas nicolas-grekas merged commit da0ad85 into symfony:6.0 Aug 13, 2021
@nicolas-grekas nicolas-grekas deleted the return-types-1 branch August 13, 2021 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants