Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
a71bb8a4
Unverified
Commit
a71bb8a4
authored
4 years ago
by
Julius Härtl
Browse files
Options
Downloads
Patches
Plain Diff
Make whole Template class final
Signed-off-by:
Julius Härtl
<
jus@bitgrid.net
>
parent
6c1b3579
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/public/Files/Template/Template.php
+16
-10
16 additions, 10 deletions
lib/public/Files/Template/Template.php
with
16 additions
and
10 deletions
lib/public/Files/Template/Template.php
+
16
−
10
View file @
a71bb8a4
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment