From a654b1585bf7b20a508aee8c54a55d104f7a0c52 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 27 Oct 2015 01:48:58 +0100 Subject: [PATCH] phpDocumentor 2.8.5 currently doesn't support the Generic notations This will likely be implemented as soon as the proposed PSR-5: PHPDoc is accepted --- lib/AbstractPicoPlugin.php | 4 ++-- lib/Pico.php | 33 ++++++++++++++++----------------- lib/PicoPluginInterface.php | 4 ++-- plugins/00-PicoDeprecated.php | 2 +- plugins/DummyPlugin.php | 20 ++++++++++---------- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/lib/AbstractPicoPlugin.php b/lib/AbstractPicoPlugin.php index cb19d44..63c36b0 100644 --- a/lib/AbstractPicoPlugin.php +++ b/lib/AbstractPicoPlugin.php @@ -41,7 +41,7 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface /** * List of plugins which this plugin depends on * - * @var array + * @var string[] * @see PicoPluginInterface::getDependencies() * @see AbstractPicoPlugin::checkDependencies() */ @@ -50,7 +50,7 @@ abstract class AbstractPicoPlugin implements PicoPluginInterface /** * List of plugin which depend on this plugin * - * @var array + * @var object[] * @see PicoPluginInterface::getDependants() * @see AbstractPicoPlugin::checkDependants() */ diff --git a/lib/Pico.php b/lib/Pico.php index ee15044..0a83929 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -89,7 +89,7 @@ class Pico * List of loaded plugins * * @see Pico::loadPlugins() - * @var array|null + * @var object[]|null */ protected $plugins; @@ -97,7 +97,7 @@ class Pico * Current configuration of this Pico instance * * @see Pico::loadConfig() - * @var array|null + * @var mixed[]|null */ protected $config; @@ -129,7 +129,7 @@ class Pico * Meta data of the page to serve * * @see Pico::parseFileMeta() - * @var array|null + * @var string[]|null */ protected $meta; @@ -146,7 +146,7 @@ class Pico * List of known pages * * @see Pico::readPages() - * @var array|null + * @var array[]|null */ protected $pages; @@ -185,7 +185,7 @@ class Pico /** * Variables passed to the twig template * - * @var array|null + * @var mixed[]|null */ protected $twigVariables; @@ -403,7 +403,7 @@ class Pico * Returns all loaded plugins * * @see Pico::loadPlugins() - * @return array|null + * @return object[]|null */ public function getPlugins() { @@ -463,11 +463,10 @@ class Pico * call and Pico::run(). Options set with this method cannot be overwritten * by {@path "config/config.php"}. * - * @param array $config array with configuration variables, - * like $config in {@path "config/config.php"} + * @param mixed[] $config array with configuration variables, like + * $config in {@path "config/config.php"} * @return void - * @throws RuntimeException thrown if Pico already started - * processing + * @throws RuntimeException thrown if Pico already started processing */ public function setConfig(array $config) { @@ -635,9 +634,9 @@ class Pico * Heads up! Calling this method triggers the `onMetaHeaders` event. * Keep this in mind to prevent a infinite loop! * - * @return array known meta headers; the array value - * specifies the YAML key to search for, the array key is later used - * to access the found value + * @return string[] known meta headers; the array value specifies the + * YAML key to search for, the array key is later used to access the + * found value */ public function getMetaHeaders() { @@ -665,9 +664,9 @@ class Pico * for users and pure (!) theme developers ONLY. * * @see - * @param string $rawContent the raw file contents - * @param array $headers known meta headers - * @return array parsed meta data + * @param string $rawContent the raw file contents + * @param string[] $headers known meta headers + * @return array parsed meta data */ public function parseFileMeta($rawContent, array $headers) { @@ -1014,7 +1013,7 @@ class Pico * URLs and paths (namely base_dir, base_url, theme_dir and theme_url) * don't add a trailing slash for historic reasons. * - * @return array template variables + * @return mixed[] template variables */ protected function getTwigVariables() { diff --git a/lib/PicoPluginInterface.php b/lib/PicoPluginInterface.php index a4dc5e1..081b280 100644 --- a/lib/PicoPluginInterface.php +++ b/lib/PicoPluginInterface.php @@ -77,14 +77,14 @@ interface PicoPluginInterface /** * Returns a list of names of plugins required by this plugin * - * @return array required plugins + * @return string[] required plugins */ public function getDependencies(); /** * Returns a list of plugins which depend on this plugin * - * @return array dependant plugins + * @return object[] dependant plugins */ public function getDependants(); diff --git a/plugins/00-PicoDeprecated.php b/plugins/00-PicoDeprecated.php index f448abe..076a726 100644 --- a/plugins/00-PicoDeprecated.php +++ b/plugins/00-PicoDeprecated.php @@ -139,7 +139,7 @@ class PicoDeprecated extends AbstractPicoPlugin /** * Read {@path "config.php"} in Picos root dir * - * @param array &$config array of config variables + * @param mixed[] &$config array of config variables * @return void */ protected function loadRootDirConfig(&$config) diff --git a/plugins/DummyPlugin.php b/plugins/DummyPlugin.php index 588721d..059b188 100644 --- a/plugins/DummyPlugin.php +++ b/plugins/DummyPlugin.php @@ -24,7 +24,7 @@ class DummyPlugin extends AbstractPicoPlugin /** * This plugin depends on {@link ...} * - * @var array + * @var string[] * @see AbstractPicoPlugin::$dependsOn */ protected $dependsOn = array(); @@ -37,7 +37,7 @@ class DummyPlugin extends AbstractPicoPlugin * * @see Pico::getPlugin() * @see Pico::getPlugins() - * @param array &$plugins loaded plugin instances + * @param object[] &$plugins loaded plugin instances * @return void */ public function onPluginsLoaded(&$plugins) @@ -49,7 +49,7 @@ class DummyPlugin extends AbstractPicoPlugin * Triggered after Pico has read its configuration * * @see Pico::getConfig() - * @param array &$config array of config variables + * @param mixed[] &$config array of config variables * @return void */ public function onConfigLoaded(&$config) @@ -134,7 +134,7 @@ class DummyPlugin extends AbstractPicoPlugin * Triggered when Pico reads its known meta header fields * * @see Pico::getMetaHeaders() - * @param array &$headers list of known meta header + * @param string[] &$headers list of known meta header * fields; the array value specifies the YAML key to search for, the * array key is later used to access the found value * @return void @@ -148,8 +148,8 @@ class DummyPlugin extends AbstractPicoPlugin * Triggered before Pico parses the meta header * * @see Pico::parseFileMeta() - * @param string &$rawContent raw file contents - * @param array &$headers known meta header fields + * @param string &$rawContent raw file contents + * @param string[] &$headers known meta header fields * @return void */ public function onMetaParsing(&$rawContent, &$headers) @@ -161,7 +161,7 @@ class DummyPlugin extends AbstractPicoPlugin * Triggered after Pico has parsed the meta header * * @see Pico::getFileMeta() - * @param array &$meta parsed meta data + * @param string[] &$meta parsed meta data * @return void */ public function onMetaParsed(&$meta) @@ -264,9 +264,9 @@ class DummyPlugin extends AbstractPicoPlugin * Triggered before Pico renders the page * * @see Pico::getTwig() - * @param Twig_Environment &$twig twig template engine - * @param array &$twigVariables template variables - * @param string &$templateName file name of the template + * @param Twig_Environment &$twig twig template engine + * @param mixed[] &$twigVariables template variables + * @param string &$templateName file name of the template * @return void */ public function onPageRendering(&$twig, &$twigVariables, &$templateName)