diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 16:30:58 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-02-06 17:02:21 +0100 |
commit | 2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356 (patch) | |
tree | 66d682a22c3d12d1838822fc52cdd48fa765f5df /lib/private/template | |
parent | 0d94da7e9ef9550c8ae0244b203ca84e5ee007b0 (diff) | |
download | nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.tar.gz nextcloud-server-2a6a9a8cefcf68f48d95e124db0c1b7edc9fe356.zip |
polish documentation based on scrutinizer patches
Diffstat (limited to 'lib/private/template')
-rw-r--r-- | lib/private/template/base.php | 16 | ||||
-rw-r--r-- | lib/private/template/functions.php | 5 | ||||
-rw-r--r-- | lib/private/template/resourcelocator.php | 8 | ||||
-rw-r--r-- | lib/private/template/templatefilelocator.php | 6 |
4 files changed, 32 insertions, 3 deletions
diff --git a/lib/private/template/base.php b/lib/private/template/base.php index 88941bc7132..e698d855a91 100644 --- a/lib/private/template/base.php +++ b/lib/private/template/base.php @@ -14,6 +14,11 @@ class Base { private $l10n; // The l10n-Object private $theme; // theme defaults + /** + * @param string $template + * @param \OC_L10N $l10n + * @param \OC_Defaults $theme + */ public function __construct( $template, $requesttoken, $l10n, $theme ) { $this->vars = array(); $this->vars['requesttoken'] = $requesttoken; @@ -22,6 +27,10 @@ class Base { $this->theme = $theme; } + /** + * @param string $serverroot + * @param string|false $app_dir + */ protected function getAppTemplateDirs($theme, $app, $serverroot, $app_dir) { // Check if the app is in the app folder or in the root if( file_exists($app_dir.'/templates/' )) { @@ -36,6 +45,9 @@ class Base { ); } + /** + * @param string $serverroot + */ protected function getCoreTemplateDirs($theme, $serverroot) { return array( $serverroot.'/themes/'.$theme.'/core/templates/', @@ -63,7 +75,7 @@ class Base { * @brief Appends a variable * @param string $key key * @param string $value value - * @return bool + * @return boolean|null * * This function assigns a variable in an array context. If the key already * exists, the value will be appended. It can be accessed via @@ -97,7 +109,7 @@ class Base { /** * @brief Process the template - * @return bool + * @return string * * This function processes the template. */ diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index ce42633b364..a72d41f72da 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -78,6 +78,9 @@ function preview_icon( $path ) { return OC_Helper::previewIcon( $path ); } +/** + * @param string $path + */ function publicPreview_icon ( $path, $token ) { return OC_Helper::publicPreviewIcon( $path, $token ); } @@ -110,7 +113,7 @@ function strip_time($timestamp){ * @param int $timestamp timestamp to format * @param int $fromTime timestamp to compare from, defaults to current time * @param bool $dateOnly whether to strip time information - * @return formatted timestamp + * @return OC_L10N_String timestamp */ function relative_modified_date($timestamp, $fromTime = null, $dateOnly = false) { $l=OC_L10N::get('lib'); diff --git a/lib/private/template/resourcelocator.php b/lib/private/template/resourcelocator.php index 9f83673664d..8a3dd5e7fa9 100644 --- a/lib/private/template/resourcelocator.php +++ b/lib/private/template/resourcelocator.php @@ -19,6 +19,10 @@ abstract class ResourceLocator { protected $resources = array(); + /** + * @param string $theme + * @param string $form_factor + */ public function __construct( $theme, $form_factor, $core_map, $party_map ) { $this->theme = $theme; $this->form_factor = $form_factor; @@ -53,6 +57,10 @@ abstract class ResourceLocator { * @param $file the filename * @param $web base for path, default map $root to $webroot */ + /** + * @param string $file + * @param string|false $webroot + */ protected function appendIfExist($root, $file, $webroot = null) { if (is_file($root.'/'.$file)) { if (!$webroot) { diff --git a/lib/private/template/templatefilelocator.php b/lib/private/template/templatefilelocator.php index d5a484b1a14..05cd752cd4f 100644 --- a/lib/private/template/templatefilelocator.php +++ b/lib/private/template/templatefilelocator.php @@ -13,11 +13,17 @@ class TemplateFileLocator { protected $dirs; private $path; + /** + * @param string[] $dirs + */ public function __construct( $form_factor, $dirs ) { $this->form_factor = $form_factor; $this->dirs = $dirs; } + /** + * @param string $template + */ public function find( $template ) { if ($template === '') { throw new \InvalidArgumentException('Empty template name'); |