Skip to content

Add type declarations to code examples #12235

Closed
@derrabus

Description

@derrabus

The Symfony codebase is being modernized by adding type declarations. I think that we should do the same here as well.

My suggestions:

  • Example code that does not override/implement a Symfony method, should be typed.
  • Example code that overrides/implements a Symfony method should be updated for 5.0 to match the added parameter type declarations.
  • Example code that overrides/implements a Symfony method should turn an upstream @return annotation into an explicit return type declaration if possible. In most cases, we can do this for the 4.4 docs already.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions