diff --git a/make/genmethoddocs.php b/make/genmethoddocs.php index c73461cb..ab27fe38 100644 --- a/make/genmethoddocs.php +++ b/make/genmethoddocs.php @@ -46,14 +46,23 @@ class ExtractClass */ protected $className = ""; + /** + * Class + method name to ignore in inheritance check + * + * @var array + */ + protected $ignoreInheritance = []; + /** * Constructor * * @param string $className + * @param array $ignoreInheritance */ - public function __construct(string $className) + public function __construct(string $className, array $ignoreInheritance = []) { $this->className = $className; + $this->ignoreInheritance = $ignoreInheritance; } /** @@ -125,7 +134,9 @@ public function getArray(): array foreach ($methods as $method) { if ($method->getDeclaringClass()->getName() != $this->className) { - continue; + if (!in_array(sprintf('%s::%s', $this->className, $method->getName()), $this->ignoreInheritance)) { + continue; + } } $docComment = $method->getDocComment(); @@ -691,10 +702,10 @@ class BatchMarkDownGenerator * @throws PcreException * @throws LogicException */ - public static function generate(array $classes) + public static function generate(array $classes, array $ignoreInheritance = []) { foreach ($classes as $className => $toFilename) { - $extractor = new ExtractClass($className); + $extractor = new ExtractClass($className, $ignoreInheritance); $generator = new MarkDownGenerator($extractor); $generator->generateMarkdown(); $generator->saveToFile($toFilename); @@ -719,4 +730,7 @@ public static function generate(array $classes) ZugferdQuickDescriptorXRechnung::class => dirname(__FILE__) . '/Class-ZugferdQuickDescriptorXRechnung.md', ZugferdQuickDescriptorXRechnung2::class => dirname(__FILE__) . '/Class-ZugferdQuickDescriptorXRechnung2.md', ZugferdQuickDescriptorXRechnung3::class => dirname(__FILE__) . '/Class-ZugferdQuickDescriptorXRechnung3.md', +], [ + 'horstoeko\zugferd\ZugferdDocumentPdfBuilder::setDeterministicModeEnabled', + 'horstoeko\zugferd\ZugferdDocumentPdfMerger::setDeterministicModeEnabled', ]);