Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-01-28 13:53:28 +0300
committerJulius Härtl <jus@bitgrid.net>2021-01-28 14:00:21 +0300
commita71bb8a485fb3b0b089a2a09b29b10d8925ab2fc (patch)
tree0df8f3fa6311010cda426938f371903bc4b93565 /lib
parent6c1b357973cc86f553ca83a9ed615e64c20d112f (diff)
Make whole Template class final
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/Files/Template/Template.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/lib/public/Files/Template/Template.php b/lib/public/Files/Template/Template.php
index 28fd00d0f83..71c02d1f5be 100644
--- a/lib/public/Files/Template/Template.php
+++ b/lib/public/Files/Template/Template.php
@@ -31,17 +31,23 @@ use OCP\Files\File;
/**
* @since 21.0.0
*/
-class Template implements \JsonSerializable {
- protected $templateType;
- protected $templateId;
- protected $file;
- protected $hasPreview = false;
- protected $previewUrl;
+final class Template implements \JsonSerializable {
+
+ /** @var string */
+ private $templateType;
+ /** @var string */
+ private $templateId;
+ /** @var File */
+ private $file;
+ /** @var bool */
+ private $hasPreview = false;
+ /** @var string|null */
+ private $previewUrl = null;
/**
* @since 21.0.0
*/
- final public function __construct(string $templateType, string $templateId, File $file) {
+ public function __construct(string $templateType, string $templateId, File $file) {
$this->templateType = $templateType;
$this->templateId = $templateId;
$this->file = $file;
@@ -50,21 +56,21 @@ class Template implements \JsonSerializable {
/**
* @since 21.0.0
*/
- final public function setCustomPreviewUrl(string $previewUrl): void {
+ public function setCustomPreviewUrl(string $previewUrl): void {
$this->previewUrl = $previewUrl;
}
/**
* @since 21.0.0
*/
- final public function setHasPreview(bool $hasPreview): void {
+ public function setHasPreview(bool $hasPreview): void {
$this->hasPreview = $hasPreview;
}
/**
* @since 21.0.0
*/
- final public function jsonSerialize() {
+ public function jsonSerialize() {
return [
'templateType' => $this->templateType,
'templateId' => $this->templateId,