Skip to content

PHPDoc Cleanup #438

Closed
Closed
@erayd

Description

@erayd

The current codebase lacks useful PHPDoc comments in many places, and needs a significant overhaul.

I would like to propose the following:

  • Every class and interface must have:
    • A short description of what the class
    • A long description explaining the class in more depth if appropriate
    • @package justinrainbow/json-schema
    • @license MIT
  • Every method must have:
    • A short description of the method
    • A long description explaining the method in more depth if appropriate
    • @api if the method is part of the official public API
    • @param <type> <name> for all parameters; mixed-type params should be stated as mixed
    • @return <type> [description] for all methods which return a value. The return description should be present for any method where the return value is not self-evident from reading the method description.
  • Every abstract method signature should be documented as per fully-defined methods.
  • Every property must have:
    • @var <type> <description>
  • Every class constant must have a PHPDoc description, but should not contain any @tags.

I would also like to add a config file for sami/sami, and delete the old documentation directory - docs hasn't been touched in 5+ years, and doesn't contain anything of substance anyway. Sami should not be added as a dev-time dependency, as it requires PHP >= 7.0 to run.

Before I go ahead and sink time into this, does what I've outlined above sound reasonable?

Finally, if someone else is keen and has the time, feel free to jump in with a PR. I'm quite happy to do all the work on this, but documentation isn't my favourite activity, so if you happen to harbour a secret passion for it...

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