From 0a635687155276b6a907e7b75ae4958fec14d9a0 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 24 Jan 2020 15:37:53 +0100 Subject: [PATCH] PHPDoc --- .../renderers.itop-attachments.php | 50 ++++++++++++------- .../portal/src/EventListener/UserProvider.php | 4 +- .../bsfileuploadfieldrenderer.class.inc.php | 16 ++++-- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php index 45a890cfb3..6640c67bbd 100644 --- a/datamodels/2.x/itop-attachments/renderers.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/renderers.itop-attachments.php @@ -1,20 +1,21 @@ +/** + * Copyright (C) 2013-2020 Combodo SARL + * + * This file is part of iTop. + * + * iTop is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * iTop is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + */ /** * Attachments rendering for iTop console. @@ -319,8 +320,20 @@ JS; } +/** + * Class TableDetailsAttachmentsRenderer + */ class TableDetailsAttachmentsRenderer extends AbstractAttachmentsRenderer { + /** + * @param bool $bWithDeleteButton + * @param array $aAttachmentsDeleted + * + * @throws \ArchivedObjectException + * @throws \CoreException + * @throws \CoreUnexpectedValue + * @throws \MySQLException + */ private function AddAttachmentsTable($bWithDeleteButton, $aAttachmentsDeleted = array()) { if ($this->GetAttachmentsCount() === 0) @@ -404,14 +417,15 @@ JS } /** - * @param $bWithDeleteButton - * @param $bIsEven + * @param bool $bWithDeleteButton + * @param bool $bIsEven * @param \DBObject $oAttachment * @param array $aAttachmentsDate * @param int[] $aAttachmentsDeleted * * @throws \ArchivedObjectException * @throws \CoreException + * @throws \Exception */ private function AddAttachmentsTableLine($bWithDeleteButton, $bIsEven, $oAttachment, $aAttachmentsDate, $aAttachmentsDeleted) { diff --git a/datamodels/2.x/itop-portal-base/portal/src/EventListener/UserProvider.php b/datamodels/2.x/itop-portal-base/portal/src/EventListener/UserProvider.php index 7d8d6d4db0..7e5131a580 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/EventListener/UserProvider.php +++ b/datamodels/2.x/itop-portal-base/portal/src/EventListener/UserProvider.php @@ -109,9 +109,7 @@ class UserProvider implements ContainerAwareInterface } /** - * Sets the container. - * - * @param \Symfony\Component\DependencyInjection\ContainerInterface|null $oContainer + * @inheritDoc */ public function setContainer(ContainerInterface $oContainer = null) { diff --git a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php index 6ad3cb7e23..5d882af610 100644 --- a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php +++ b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php @@ -1,7 +1,7 @@ oField->GetGlobalId(); $sFieldWrapperId = 'form_upload_wrapper_' . $this->oField->GetGlobalId(); - // if collapsed + // If collapsed $sCollapseTogglerClass .= ' collapsed'; $sCollapseTogglerExpanded = 'false'; $sCollapseTogglerIconClass = $sCollapseTogglerIconHiddenClass; @@ -397,7 +398,7 @@ JS HTML ); - /** @var Attachment $oAttachment */ + /** @var \Attachment $oAttachment */ while ($oAttachment = $this->oAttachmentsSet->Fetch()) { $iAttId = $oAttachment->GetKey(); @@ -456,7 +457,13 @@ HTML } } - protected static function GetAttachmentTableHeader() + /** + * @param bool $bIsDeleteAllowed + * + * @return string + * @since 2.7.0 + */ + protected static function GetAttachmentTableHeader($bIsDeleteAllowed) { $sTitleThumbnail = Dict::S('Attachments:File:Thumbnail'); $sTitleFileName = Dict::S('Attachments:File:Name'); @@ -487,6 +494,7 @@ HTML; * @param boolean $bIsDeleteAllowed * * @return string + * @since 2.7.0 */ protected static function GetAttachmentTableRow( $iAttId, $sLineStyle, $sDocDownloadUrl, $sIconClass, $sAttachmentThumbUrl, $sFileName, $sAttachmentMeta, $sFileSize,