projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0e1473
)
APIExplorer::formatDocBlock() - Make public. Normalize whitespace.
author
Tim Otten
<totten@civicrm.org>
Thu, 13 Apr 2017 23:48:32 +0000
(16:48 -0700)
committer
Tim Otten
<totten@civicrm.org>
Fri, 14 Apr 2017 03:20:45 +0000
(20:20 -0700)
This will make the function more useful for the hook inspector.
CRM/Admin/Page/APIExplorer.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Admin/Page/APIExplorer.php
b/CRM/Admin/Page/APIExplorer.php
index 6097d5831a3f895ca037361ae0429e5e482501b5..c5bfa84a05a36fee6fd4d0b0e398b77c19e22007 100644
(file)
--- a/
CRM/Admin/Page/APIExplorer.php
+++ b/
CRM/Admin/Page/APIExplorer.php
@@
-184,7
+184,12
@@
class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
* @param string $text
* @return string
*/
- private static function formatDocBlock($text) {
+ public static function formatDocBlock($text) {
+ // Normalize #leading spaces.
+ $lines = explode("\n", $text);
+ $lines = preg_replace('/^ +\*/', ' *', $lines);
+ $text = implode("\n", $lines);
+
// Get rid of comment stars
$text = str_replace(array("\n * ", "\n *\n", "\n */\n", "/**\n"), array("\n", "\n\n", '', ''), $text);