Browse Source

hide injected params; empty description block

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
b0261d7624
2 changed files with 13 additions and 6 deletions
  1. 7
    5
      src/Doc/Business/DocBlock.php
  2. 6
    1
      src/Doc/Business/LuDocBusiness.php

+ 7
- 5
src/Doc/Business/DocBlock.php View File

@@ -93,11 +93,13 @@ class DocBlock {
93 93
                     $value = $matches[3];
94 94
                     $param_name = substr($param_name, 1);
95 95
 
96
-                    $this->all_params[$param_name] = [
97
-                        "name" => $param_name,
98
-                        "type" => $param_type,
99
-                        "description" => $value
100
-                    ];
96
+                    if (strpos($param_name, "_") !== 0) {
97
+                        $this->all_params[$param_name] = [
98
+                            "name" => $param_name,
99
+                            "type" => $param_type,
100
+                            "description" => $value
101
+                        ];
102
+                    }
101 103
                 }
102 104
             }
103 105
         }

+ 6
- 1
src/Doc/Business/LuDocBusiness.php View File

@@ -152,7 +152,12 @@ class LuDocBusiness
152 152
         }
153 153
         else {
154 154
             $docParser = new DocBlock($description);
155
-            $description = $docParser->description;
155
+            if (trim($docParser->description) != "") {
156
+                $description = $docParser->description;
157
+            }
158
+            else {
159
+                $description = "No description available";
160
+            }
156 161
         }
157 162
 
158 163
         $parameters = [];

Loading…
Cancel
Save