Skip to content

PHPDoc

  1. Do not use PHPDoc to just duplicate PHP types info
  2. Always specify iterable types for arrays, Collections, Generics, etc. Some Examples:
    • array<string, string>
    • list<string>
    • Collection<int, Article>
    • \Generator<string, array{authorName: string, url: string}> More you can find at the Traversable Types doc.