@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't atomize closures

Summary: In a PHP5.3+ codebase with closures, Diviner would pick up anonymous functions and add them into the generated documentation. This causes them to be skipped.

Test Plan: Ran `bin/diviner generate --clean` before and after change, no longer got a bunch of unnamed functions dumped into the documentation.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9786

authored by

Eric Stern and committed by
epriestley
ede6947d 7304e29d

+5
+5
src/applications/diviner/atomizer/DivinerPHPAtomizer.php
··· 22 22 23 23 $name = $func->getChildByIndex(2); 24 24 25 + // Don't atomize closures 26 + if ($name->getTypeName() === 'n_EMPTY') { 27 + continue; 28 + } 29 + 25 30 $atom = $this->newAtom(DivinerAtom::TYPE_FUNCTION) 26 31 ->setName($name->getConcreteString()) 27 32 ->setLine($func->getLineNumber())