From e6f8d36effad9bfd94ba98ea4701e26a875c61ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Tue, 8 Jan 2019 11:14:57 +0100 Subject: [PATCH] s/String/string in phpDoc See #2825 --- .../lib/action/AJAXFileDeleteAction.class.php | 6 ++-- .../lib/action/AJAXFileUploadAction.class.php | 2 +- .../system/file/upload/UploadField.class.php | 16 ++++----- .../system/file/upload/UploadFile.class.php | 20 +++++------ .../file/upload/UploadHandler.class.php | 36 +++++++++---------- 5 files changed, 39 insertions(+), 41 deletions(-) diff --git a/wcfsetup/install/files/lib/action/AJAXFileDeleteAction.class.php b/wcfsetup/install/files/lib/action/AJAXFileDeleteAction.class.php index 9a063456b9..5a66ca6c18 100644 --- a/wcfsetup/install/files/lib/action/AJAXFileDeleteAction.class.php +++ b/wcfsetup/install/files/lib/action/AJAXFileDeleteAction.class.php @@ -4,8 +4,6 @@ use wcf\system\exception\AJAXException; use wcf\system\exception\UserInputException; use wcf\system\file\upload\UploadFile; use wcf\system\file\upload\UploadHandler; -use wcf\system\WCF; -use wcf\util\FileUtil; use wcf\util\JSON; /** @@ -22,13 +20,13 @@ class AJAXFileDeleteAction extends AbstractSecureAction { /** * The internal upload id. - * @var String + * @var string */ public $internalId; /** * The unique file id. - * @var String + * @var string */ public $uniqueFileId; diff --git a/wcfsetup/install/files/lib/action/AJAXFileUploadAction.class.php b/wcfsetup/install/files/lib/action/AJAXFileUploadAction.class.php index 4dd278eceb..b43a9caa92 100644 --- a/wcfsetup/install/files/lib/action/AJAXFileUploadAction.class.php +++ b/wcfsetup/install/files/lib/action/AJAXFileUploadAction.class.php @@ -22,7 +22,7 @@ class AJAXFileUploadAction extends AbstractSecureAction { /** * The internal upload id. - * @var String + * @var string */ public $internalId; diff --git a/wcfsetup/install/files/lib/system/file/upload/UploadField.class.php b/wcfsetup/install/files/lib/system/file/upload/UploadField.class.php index 481697a069..d1206bfc81 100644 --- a/wcfsetup/install/files/lib/system/file/upload/UploadField.class.php +++ b/wcfsetup/install/files/lib/system/file/upload/UploadField.class.php @@ -56,9 +56,9 @@ class UploadField { /** * UploadField constructor. * - * @param String $fieldId - * @param String $fieldName - * @param String $fieldDescription + * @param string $fieldId + * @param string $fieldName + * @param string $fieldDescription */ public function __construct($fieldId, $fieldName = 'Upload', $fieldDescription = null) { $this->fieldId = $fieldId; @@ -96,7 +96,7 @@ class UploadField { /** * Returns the fieldId. * - * @return String + * @return string */ public function getFieldId() { return $this->fieldId; @@ -105,7 +105,7 @@ class UploadField { /** * Sets the internalId for this field. * - * @param String $internalId + * @param string $internalId */ public function setInternalId($internalId) { $this->internalId = $internalId; @@ -114,7 +114,7 @@ class UploadField { /** * Returns the internalId of this field. * - * @return String|null + * @return string|null */ public function getInternalId() { return $this->internalId; @@ -123,7 +123,7 @@ class UploadField { /** * Returns the name of the field. * - * @return String + * @return string */ public function getName() { return WCF::getLanguage()->get($this->name); @@ -132,7 +132,7 @@ class UploadField { /** * Returns the description of the field. * - * @return String + * @return string */ public function getDescription() { return WCF::getLanguage()->get($this->description); diff --git a/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php b/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php index 3877295825..e32f155bf7 100644 --- a/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php +++ b/wcfsetup/install/files/lib/system/file/upload/UploadFile.class.php @@ -14,7 +14,7 @@ use wcf\util\FileUtil; class UploadFile { /** * Location for the file. - * @var String + * @var string */ private $location; @@ -26,7 +26,7 @@ class UploadFile { /** * The filename. - * @var String + * @var string */ private $filename; @@ -50,15 +50,15 @@ class UploadFile { /** * The unique id for the file. - * @var String + * @var string */ private $uniqueId; /** * UploadFile constructor. * - * @param String $location - * @param String $filename + * @param string $location + * @param string $filename * @param boolean $viewableImage * @param boolean $processed */ @@ -92,7 +92,7 @@ class UploadFile { * Returns the image location or a base64 encoded string of the image. Returns null * if the file is not an image or the image is not viewable. * - * @return String|null + * @return string|null */ public function getImage() { if (!$this->isImage() || !$this->viewableImage) { @@ -111,7 +111,7 @@ class UploadFile { /** * Returns the location of the file. * - * @return String + * @return string */ public function getLocation() { return $this->location; @@ -120,7 +120,7 @@ class UploadFile { /** * Returns the filename of the file. * - * @return String + * @return string */ public function getFilename() { return $this->filename; @@ -128,7 +128,7 @@ class UploadFile { /** * Returns the unique file id for the file. It is used to identify the certain file. - * @return String + * @return string */ public function getUniqueFileId() { return $this->uniqueId; @@ -138,7 +138,7 @@ class UploadFile { * Sets the new location of the file, after it is processed and * sets the `processed` attribute to true. * - * @param String $newLocation + * @param string $newLocation */ public function setProcessed($newLocation) { if (!file_exists($newLocation)) { diff --git a/wcfsetup/install/files/lib/system/file/upload/UploadHandler.class.php b/wcfsetup/install/files/lib/system/file/upload/UploadHandler.class.php index 18a0130a56..9dafd645ab 100644 --- a/wcfsetup/install/files/lib/system/file/upload/UploadHandler.class.php +++ b/wcfsetup/install/files/lib/system/file/upload/UploadHandler.class.php @@ -58,7 +58,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the uploaded files for a specific fieldId. * - * @param String $fieldId + * @param string $fieldId * @return UploadFile[] */ public function getFilesForFieldId($fieldId) { @@ -72,7 +72,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the removed but previosly proccessed files for a specific fieldId. * - * @param String $fieldId + * @param string $fieldId * @param boolean $processFiles * @return UploadFile[] */ @@ -87,7 +87,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the removed but previosly proccessed files for a specific internalId. * - * @param String $internalId + * @param string $internalId * @param boolean $processFiles * @return UploadFile[] */ @@ -148,8 +148,8 @@ class UploadHandler extends SingletonFactory { /** * Renders the field with the given fieldId for the template. - * @param String $fieldId - * @return String + * @param string $fieldId + * @return string */ public function renderField($fieldId) { if (!isset($this->fields[$fieldId])) { @@ -166,7 +166,7 @@ class UploadHandler extends SingletonFactory { /** * Returns true, if the given internalId is valid. * - * @param String $internalId + * @param string $internalId * @return boolean */ public function isValidInternalId($internalId) { @@ -175,8 +175,8 @@ class UploadHandler extends SingletonFactory { /** * - * @param String $internalId - * @param String $uniqueFileId + * @param string $internalId + * @param string $uniqueFileId * @return boolean */ public function isValidUniqueFileId($internalId, $uniqueFileId) { @@ -185,8 +185,8 @@ class UploadHandler extends SingletonFactory { /** * - * @param String $internalId - * @param String $uniqueFileId + * @param string $internalId + * @param string $uniqueFileId * @return UploadFile|null */ public function getFileForUniqueFileId($internalId, $uniqueFileId) { @@ -206,7 +206,7 @@ class UploadHandler extends SingletonFactory { /** * Add a file for an internalId. * - * @param String $internalId + * @param string $internalId * @param UploadFile $file */ public function addFileForInternalId($internalId, UploadFile $file) { @@ -219,7 +219,7 @@ class UploadHandler extends SingletonFactory { * HEADS UP: Deletes all uploaded files and overwrites them with * the given files. If you want to add a file, use the addFileForInternalId method. * - * @param String $internalId + * @param string $internalId * @param UploadFile[] $files */ public function registerFilesForInternalId($internalId, array $files) { @@ -242,7 +242,7 @@ class UploadHandler extends SingletonFactory { /** * Add a file for an upload field with the given fieldId. * - * @param String $fieldId + * @param string $fieldId * @param UploadFile $file */ public function addFileForField($fieldId, UploadFile $file) { @@ -255,7 +255,7 @@ class UploadHandler extends SingletonFactory { * HEADS UP: Deletes all uploaded files and overwrites them with * the given files. If you want to add a file, use the addFileForField method. * - * @param String $fieldId + * @param string $fieldId * @param UploadFile[] $files */ public function registerFilesForField($fieldId, array $files) { @@ -269,7 +269,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the field for the internalId. * - * @param String $internalId + * @param string $internalId * @return UploadField */ public function getFieldForInternalId($internalId) { @@ -283,7 +283,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the count of uploaded files for an internal id. * - * @param String $internalId + * @param string $internalId * @return int */ public function getFilesCountForInternalId($internalId) { @@ -293,7 +293,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the files for an internal identifier. * - * @param String $internalId + * @param string $internalId * @return UploadFile[] */ private function getFilesForInternalId($internalId) { @@ -358,7 +358,7 @@ class UploadHandler extends SingletonFactory { /** * Returns the known internalIds. * - * @return String[] + * @return string[] */ private function getKnownInternalIds() { return array_keys($this->getStorage()); -- 2.20.1