From 4f83462f6788b863bdeaa1e29c344dfc7550698c Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 9 Feb 2018 09:20:11 +0100 Subject: Add phpdoc, typehints and sanitize HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../lib/Template/ExternalShareMenuAction.php | 16 +++++++++++++++- apps/files_sharing/lib/Template/LinkMenuAction.php | 17 ++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/lib/Template/ExternalShareMenuAction.php b/apps/files_sharing/lib/Template/ExternalShareMenuAction.php index a81712cb591..f548a3bc6f1 100644 --- a/apps/files_sharing/lib/Template/ExternalShareMenuAction.php +++ b/apps/files_sharing/lib/Template/ExternalShareMenuAction.php @@ -28,11 +28,25 @@ use OCP\Util; class ExternalShareMenuAction extends SimpleMenuAction { + /** @var string */ private $owner; + + /** @var string */ private $displayname; + + /** @var string */ private $shareName; - public function __construct($label, $icon, $owner, $displayname, $shareName) { + /** + * ExternalShareMenuAction constructor. + * + * @param string $label + * @param string $icon + * @param string $owner + * @param string $displayname + * @param string $shareName + */ + public function __construct(string $label, string $icon, string $owner, string $displayname, string $shareName) { parent::__construct('save', $label, $icon); $this->owner = $owner; $this->displayname = $displayname; diff --git a/apps/files_sharing/lib/Template/LinkMenuAction.php b/apps/files_sharing/lib/Template/LinkMenuAction.php index af5fda94455..b75d8c2f790 100644 --- a/apps/files_sharing/lib/Template/LinkMenuAction.php +++ b/apps/files_sharing/lib/Template/LinkMenuAction.php @@ -24,23 +24,30 @@ namespace OCA\Files_Sharing\Template; use OCP\AppFramework\Http\Template\SimpleMenuAction; +use OCP\Util; class LinkMenuAction extends SimpleMenuAction { - public function __construct($label, $icon, $link) { + /** + * LinkMenuAction constructor. + * + * @param string $label + * @param string $icon + * @param string $link + */ + public function __construct(string $label, string $icon, string $link) { parent::__construct('directLink-container', $label, $icon, $link); } /** - * @since 14.0.0 * @return string */ public function render(): string { return '
  • ' . '' . - '' . - '' . - '' . + '' . + '' . + '' . '' . '
  • '; } -- cgit v1.2.3