Upstatement / routes

Simple routing for WordPress
188 stars 39 forks source link

Bad phpdoc #30

Closed dimitriBouteille closed 3 years ago

dimitriBouteille commented 3 years ago

I think there is an error with the documentation of the function Routes::load(...)

* @param array $template           A php file to load (ex: 'single.php')
* @param array|bool $tparams       An array of data to send to the php file. Inside the php file
...

The $template variable is not I think of type array but of type string, so the phpdoc must be :

* @param string $template           A php file to load (ex: 'single.php')
* @param array|bool $tparams     An array of data to send to the php file. Inside the php file
...

I have this error : Expected parameter of type 'array', 'string' provided :(

Capture d’écran du 2021-04-19 00-59-13

dimitriBouteille commented 3 years ago

No news @jarednova ?

jarednova commented 3 years ago

@dimitriBouteille submit a PR!

dimitriBouteille commented 3 years ago

Already fix in this commit : https://github.com/Upstatement/routes/commit/9064f968da09d1714f26a9d1623dae909be49907#diff-7ca92ebfc8afde64bb3b92b501148a42ef43d55adc661f288a70933cc21e829d