Skip to content

v1.6.1

tagged this 02 Dec 03:56
- As you may know, the `LazyDoctor` tool automatically adds a summary
  line containing the current class name whenever it documents a class
  that doesn't have any summary. However, previous versions of the tool
  didn't automatically update that summary again if you renamed your
  class later. But with this new enhancement, `LazyDoctor` now scans the
  first line of the class docs to check if it's a class name. And if it
  follows the exact format `OneWordClassName<period>`, then we assume
  that it's an auto-added class name summary and will automatically
  update it to match the latest class name (if you have renamed it).

- The reason that this auto-updating function wasn't implemented earlier
  is because of the very tiny risk of false positives. But that risk is
  extremely low, since we only document `LazyJsonMapper`-based classes,
  and we ensure that the first line matches the *exact* regex used by
  PHP classes, followed by a period. If you put any other characters in
  the summary (such as exclamation marks, commas or spaces), then we
  won't interpret the line as an auto-added class name summary anymore.
  And single-word class summaries are extremely rare anyway. So all of
  those factors combined means that it's better to add this new,
  convenient auto-updater which ensures that all classnames are
  up-to-date, since most people are never going to run into any false
  positives. And if they do, they can simply write a two-word summary
  instead, so that it'll be left alone by `LazyDoctor`. ;-)
Assets 2
Loading