@@ -2756,41 +2756,37 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2756
2756
"&InheritedProperties; "
2757
2757
);
2758
2758
2759
- if (!empty ($ this ->funcInfos )) {
2760
- $ classSynopsis ->appendChild (new DOMText ("\n\n " ));
2761
- $ classSynopsisInfo = $ doc ->createElement ("classsynopsisinfo " , "&Methods; " );
2762
- $ classSynopsisInfo ->setAttribute ("role " , "comment " );
2763
- $ classSynopsis ->appendChild ($ classSynopsisInfo );
2759
+ $ classSynopsis ->appendChild (new DOMText ("\n\n " ));
2760
+ $ classSynopsisInfo = $ doc ->createElement ("classsynopsisinfo " , "&Methods; " );
2761
+ $ classSynopsisInfo ->setAttribute ("role " , "comment " );
2762
+ $ classSynopsis ->appendChild ($ classSynopsisInfo );
2764
2763
2765
- $ classReference = self ::getClassSynopsisReference ($ this ->name );
2766
- $ escapedName = addslashes ($ this ->name ->__toString ());
2764
+ $ classReference = self ::getClassSynopsisReference ($ this ->name );
2765
+ $ escapedName = addslashes ($ this ->name ->__toString ());
2767
2766
2768
- if ($ this ->hasConstructor ()) {
2769
- $ classSynopsis ->appendChild (new DOMText ("\n " ));
2770
- $ includeElement = $ this ->createIncludeElement (
2771
- $ doc ,
2772
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role=' $ escapedName']) "
2773
- );
2774
- $ classSynopsis ->appendChild ($ includeElement );
2775
- }
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 );
2776
2773
2777
- if ($ this ->hasMethods ()) {
2778
- $ classSynopsis ->appendChild (new DOMText ("\n " ));
2779
- $ includeElement = $ this ->createIncludeElement (
2780
- $ doc ,
2781
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedName']) "
2782
- );
2783
- $ classSynopsis ->appendChild ($ includeElement );
2784
- }
2774
+ if ($ this ->hasMethods ()) {
2775
+ $ classSynopsis ->appendChild (new DOMText ("\n " ));
2776
+ $ includeElement = $ this ->createIncludeElement (
2777
+ $ doc ,
2778
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedName']) "
2779
+ );
2780
+ $ classSynopsis ->appendChild ($ includeElement );
2781
+ }
2785
2782
2786
- if ($ this ->hasDestructor ()) {
2787
- $ classSynopsis ->appendChild (new DOMText ("\n " ));
2788
- $ includeElement = $ this ->createIncludeElement (
2789
- $ doc ,
2790
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role=' $ escapedName']) "
2791
- );
2792
- $ classSynopsis ->appendChild ($ includeElement );
2793
- }
2783
+ if ($ this ->hasDestructor ()) {
2784
+ $ classSynopsis ->appendChild (new DOMText ("\n " ));
2785
+ $ includeElement = $ this ->createIncludeElement (
2786
+ $ doc ,
2787
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role=' $ escapedName']) "
2788
+ );
2789
+ $ classSynopsis ->appendChild ($ includeElement );
2794
2790
}
2795
2791
2796
2792
if (!empty ($ parentsWithInheritedMethods )) {
@@ -2805,7 +2801,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
2805
2801
$ escapedParentName = addslashes ($ parent ->__toString ());
2806
2802
$ includeElement = $ this ->createIncludeElement (
2807
2803
$ doc ,
2808
- "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedParentName') ]) "
2804
+ "xmlns(db=http://docbook.org/ns/docbook) xpointer(id(' $ parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role=' $ escapedParentName']) "
2809
2805
);
2810
2806
$ classSynopsis ->appendChild ($ includeElement );
2811
2807
}
@@ -4262,16 +4258,18 @@ function replaceClassSynopses(string $targetDirectory, array $classMap, iterable
4262
4258
$ replacedXml = preg_replace (
4263
4259
[
4264
4260
"/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/ " ,
4265
- "/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc= \"([a-z0-9.:\/]+) \"\s+xmlns= \"([a-z0-9.:\/]+) \"\s+xml:id= \"([a-z0-9._-]+) \"\s*>/i " ,
4266
- "/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc= \"([a-z0-9.:\/]+) \"\s+xmlns= \"([a-z0-9.:\/]+) \"\s+xmlns:xi= \"([a-z0-9.:\/]+) \"\s+xml:id= \"([a-z0-9._-]+) \"\s*>/i " ,
4267
- "/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc= \"([a-z0-9.:\/]+) \"\s+xmlns= \"([a-z0-9.:\/]+) \"\s+xmlns:xlink= \"([a-z0-9.:\/]+) \"\s+xmlns:xi= \"([a-z0-9.:\/]+) \"\s+xml:id= \"([a-z0-9._-]+) \"\s*>/i " ,
4268
- "/<phpdoc:(classref|exceptionref)\s+xmlns= \"([a-z0-9.:\/]+) \"\s+xmlns:xlink= \"([a-z0-9.:\/]+) \"\s+xmlns:xi= \"([a-z0-9.:\/]+) \"\s+xmlns:phpdoc= \"([a-z0-9.:\/]+) \"\s+xml:id= \"([a-z0-9._-]+) \"\s*>/i " ,
4261
+ '/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc=\"([^"]+)"\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4262
+ '/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc=\"([^"]+)"\s+xmlns="([^"]+)"\s+xmlns:xi="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4263
+ '/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc=\"([^"]+)"\s+xmlns="([^"]+)"\s+xmlns:xlink="([^"]+)"\s+xmlns:xi="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4264
+ '/<phpdoc:(classref|exceptionref)\s+xmlns:phpdoc=\"([^"]+)"\s+xmlns:xlink="([^"]+)"\s+xmlns:xi="([^"]+)"\s+xmlns="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4265
+ '/<phpdoc:(classref|exceptionref)\s+xmlns=\"([^"]+)\"\s+xmlns:xlink="([^"]+)"\s+xmlns:xi="([^"]+)"\s+xmlns:phpdoc="([^"]+)"\s+xml:id="([^"]+)"\s*>/i ' ,
4269
4266
],
4270
4267
[
4271
4268
"&$1 " ,
4272
4269
"<phpdoc:$1 xml:id= \"$4 \" xmlns:phpdoc= \"$2 \" xmlns= \"$3 \"> " ,
4273
4270
"<phpdoc:$1 xml:id= \"$5 \" xmlns:phpdoc= \"$2 \" xmlns= \"$3 \" xmlns:xi= \"$4 \"> " ,
4274
4271
"<phpdoc:$1 xml:id= \"$6 \" xmlns:phpdoc= \"$2 \" xmlns= \"$3 \" xmlns:xlink= \"$4 \" xmlns:xi= \"$5 \"> " ,
4272
+ "<phpdoc:$1 xml:id= \"$6 \" xmlns:phpdoc= \"$2 \" xmlns= \"$5 \" xmlns:xlink= \"$3 \" xmlns:xi= \"$4 \"> " ,
4275
4273
"<phpdoc:$1 xml:id= \"$6 \" xmlns:phpdoc= \"$5 \" xmlns= \"$2 \" xmlns:xlink= \"$3 \" xmlns:xi= \"$4 \"> " ,
4276
4274
],
4277
4275
$ replacedXml
@@ -4495,8 +4493,8 @@ function replaceMethodSynopses(string $targetDirectory, array $funcMap, array $a
4495
4493
$ replacedXml = preg_replace (
4496
4494
[
4497
4495
"/REPLACED-ENTITY-([A-Za-z0-9._{}%-]+?;)/ " ,
4498
- " /<refentry\s+xmlns= \ "([a-z0-9.:\/ ]+) \ "\s+xml:id= \ "([a-z0-9._- ]+) \ "\s*>/i " ,
4499
- " /<refentry\s+xmlns= \ "([a-z0-9.:\/ ]+) \ "\s+xmlns:xlink= \ "([a-z0-9.:\/ ]+) \ "\s+xml:id= \ "([a-z0-9._- ]+) \ "\s*>/i " ,
4496
+ ' /<refentry\s+xmlns="([^" ]+)"\s+xml:id="([^" ]+)"\s*>/i ' ,
4497
+ ' /<refentry\s+xmlns="([^" ]+)"\s+xmlns:xlink="([^" ]+)"\s+xml:id="([^" ]+)"\s*>/i ' ,
4500
4498
],
4501
4499
[
4502
4500
"&$1 " ,
0 commit comments