[php-src] master: gen_stub: deduplicate and simplify DocCommentTag processing

From: Date: Thu, 08 May 2025 20:18:21 +0000
Subject: [php-src] master: gen_stub: deduplicate and simplify DocCommentTag processing
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
Author: Daniel Scherzer (DanielEScherzer)
Committer: DanielEScherzer (DanielEScherzer)
Date: 2025-05-08T13:06:51-07:00

Commit: https://github.com/php/php-src/commit/bb555926c4bbfb93002459c76494cd6780ae303d
Raw diff: https://github.com/php/php-src/commit/bb555926c4bbfb93002459c76494cd6780ae303d.diff

gen_stub: deduplicate and simplify DocCommentTag processing

For a lot of the structures, the parsing of doc comment tags is based on if a
specific tag is present, or the value that it has if it is. Add a new helper
method, DocCommentTag::makeTagMap(), that turns an array of tag instances
into a map from tag name to value (the last value, if there are multiple uses
of the same tag name). Then, for the simple cases where just a tag's presence
is all that is checked, or just the (last) value is used, check the map instead
of using a loop through all of the tags present.

Changed paths:
  M  build/gen_stub.php


Diff:


Thread (1 message)

  • Daniel Scherzer via DanielEScherzer
« previous php.cvs (#134106) next »