Quellcode durchsuchen

hide injected params; empty description block

tags/0.1.0
Robin Thoni vor 8 Jahren
Ursprung
Commit
b0261d7624
2 geänderte Dateien mit 13 neuen und 6 gelöschten Zeilen
  1. 7
    5
      src/Doc/Business/DocBlock.php
  2. 6
    1
      src/Doc/Business/LuDocBusiness.php

+ 7
- 5
src/Doc/Business/DocBlock.php Datei anzeigen

93
                     $value = $matches[3];
93
                     $value = $matches[3];
94
                     $param_name = substr($param_name, 1);
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 Datei anzeigen

152
         }
152
         }
153
         else {
153
         else {
154
             $docParser = new DocBlock($description);
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
         $parameters = [];
163
         $parameters = [];

Laden…
Abbrechen
Speichern