@@ -2756,20 +2756,26 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2756
2756
"&InheritedProperties; "
2757
2757
);
2758
2758
2759
- $ classSynopsis ->appendChild (new DOMText ("\n\n " ));
2760
- $ classSynopsisInfo = $ doc ->createElement ("classsynopsisinfo " , "&Methods; " );
2761
- $ classSynopsisInfo ->setAttribute ("role " , "comment " );
2762
- $ classSynopsis ->appendChild ($ classSynopsisInfo );
2759
+ $ isConcreteClass = ($ this ->type === "class " && !($ this ->flags & Class_::MODIFIER_ABSTRACT ));
2760
+
2761
+ if ($ isConcreteClass || !empty ($ this ->funcInfos )) {
2762
+ $ classSynopsis ->appendChild (new DOMText ("\n\n " ));
2763
+ $ classSynopsisInfo = $ doc ->createElement ("classsynopsisinfo " , "&Methods; " );
2764
+ $ classSynopsisInfo ->setAttribute ("role " , "comment " );
2765
+ $ classSynopsis ->appendChild ($ classSynopsisInfo );
2766
+ }
2763
2767
2764
2768
$ classReference = self ::getClassSynopsisReference ($ this ->name );
2765
2769
$ escapedName = addslashes ($ this ->name ->__toString ());
2766
2770
2767
- $ classSynopsis ->appendChild (new DOMText ("\n " ));
2768
- $ includeElement = $ this ->createIncludeElement (
2769
- $ doc ,
2770
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ escapedName']) "
2771
- );
2772
- $ classSynopsis ->appendChild ($ includeElement );
2771
+ if ($ isConcreteClass || $ this ->hasConstructor ()) {
2772
+ $ classSynopsis ->appendChild (new DOMText ("\n " ));
2773
+ $ includeElement = $ this ->createIncludeElement (
2774
+ $ doc ,
2775
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ escapedName']) "
2776
+ );
2777
+ $ classSynopsis ->appendChild ($ includeElement );
2778
+ }
2773
2779
2774
2780
if ($ this ->hasMethods ()) {
2775
2781
$ classSynopsis ->appendChild (new DOMText ("\n " ));
0 commit comments