@@ -61,6 +61,9 @@ class Controller
6161 Controller::PAGE ,
6262 ];
6363
64+ /**
65+ * @var array<string> $accessTabs tabs to show access in UI
66+ */
6467 private array $ accessTabs = ['Public ' , 'Protected ' , 'Private ' , 'Static ' ];
6568
6669 private \PHPFUI \InstaDoc \FileManager $ fileManager ;
@@ -71,6 +74,9 @@ class Controller
7174
7275 private string $ gitRoot = '' ;
7376
77+ /**
78+ * @var array<string, bool> markdown file names
79+ */
7480 private array $ homePageMarkdown = [];
7581
7682 private string $ homeUrl = '# ' ;
@@ -79,6 +85,9 @@ class Controller
7985
8086 private \PHPFUI \InstaDoc \PageInterface $ page ;
8187
88+ /**
89+ * @var array<string, string>
90+ */
8291 private array $ parameters = [];
8392
8493 private string $ siteTitle = 'PHPFUI/InstaDoc ' ;
@@ -111,7 +120,7 @@ public function clearMenu() : Controller
111120 /**
112121 * Display a page according to the parameters passed on the url.
113122 *
114- * @param array $classPagesToShow limits the allowed pages to display, used for static file generation
123+ * @param array<string> $classPagesToShow limits the allowed pages to display, used for static file generation
115124 * @param ?PageInterface $page to use, default to current controller page, but pass in a new page for multiple page generations on the same controller instance
116125 */
117126 public function display (array $ classPagesToShow = Controller::VALID_CLASS_PAGES , ?PageInterface $ page = null ) : string
@@ -205,7 +214,9 @@ public function display(array $classPagesToShow = Controller::VALID_CLASS_PAGES,
205214 /**
206215 * Generate static files for high volume sites. Pass the path to the directory where you want the files to be placed, it must exist.
207216 *
208- * @return array with generation file count and time
217+ * @param array<string> $pagesToInclude
218+ *
219+ * @return array<string, float|int<1, max>> array with generation file count and time
209220 */
210221 public function generate (string $ directoryPath , array $ pagesToInclude = [Controller::DOC_PAGE ], string $ extension = '.html ' ) : array
211222 {
@@ -270,13 +281,17 @@ public function generate(string $directoryPath, array $pagesToInclude = [Control
270281 return ['count ' => $ count , 'seconds ' => $ milliseconds ];
271282 }
272283
284+ /**
285+ * @return array<string> tabs to show access in UI
286+ */
273287 public function getAccessTabs () : array
274288 {
275289 return $ this ->accessTabs ;
276290 }
277291
278292 /**
279293 * break up a namespaced class into parts
294+ * @return array<string, string>
280295 */
281296 public function getClassParts (string $ namespacedClass ) : array
282297 {
@@ -340,6 +355,8 @@ public function getGitRoot() : string
340355
341356 /**
342357 * Get unique home page markdown files
358+ *
359+ * @return array<string> markdown file names
343360 */
344361 public function getHomePageMarkdown () : array
345362 {
@@ -447,6 +464,8 @@ public function getParameter(string $parameter, ?string $default = null) : strin
447464
448465 /**
449466 * Get all parameters
467+ *
468+ * @return array<string, string>
450469 */
451470 public function getParameters () : array
452471 {
@@ -482,9 +501,9 @@ public function getConstructorParameters(string $className) : string
482501 return $ html2Text ->getText ();
483502 }
484503
485- /**
486- * Get a section for display. Override to change layout
487- */
504+ /**
505+ * Get a section for display. Override to change layout
506+ */
488507 public function getSection (string $ sectionName ) : Section
489508 {
490509 if (! \in_array ($ sectionName , Controller::SECTIONS ))
@@ -499,6 +518,8 @@ public function getSection(string $sectionName) : Section
499518
500519 /**
501520 * Get a url given parameters. Remove invalid parameters.
521+ *
522+ * @param array<string, string> $parameters
502523 */
503524 public function getUrl (array $ parameters ) : string
504525 {
@@ -538,6 +559,9 @@ public function getUrl(array $parameters) : string
538559 return $ url ;
539560 }
540561
562+ /**
563+ * @param array<string> $tabs tabs to show access in UI
564+ */
541565 public function setAccessTabs (array $ tabs ) : Controller
542566 {
543567 $ this ->accessTabs = $ tabs ;
@@ -607,6 +631,8 @@ public function setParameter(string $parameter, string $value) : Controller
607631
608632 /**
609633 * Set the valid parameters from an array
634+ *
635+ * @param array<string, string> $parameters key value pairs
610636 */
611637 public function setParameters (array $ parameters ) : Controller
612638 {
0 commit comments