aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Avatars/AvatarNode.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Avatars/AvatarNode.php')
-rw-r--r--apps/dav/lib/Avatars/AvatarNode.php42
1 files changed, 10 insertions, 32 deletions
diff --git a/apps/dav/lib/Avatars/AvatarNode.php b/apps/dav/lib/Avatars/AvatarNode.php
index ade523561f2..b3a605fbb02 100644
--- a/apps/dav/lib/Avatars/AvatarNode.php
+++ b/apps/dav/lib/Avatars/AvatarNode.php
@@ -1,24 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud GmbH
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2017 ownCloud GmbH
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\DAV\Avatars;
@@ -26,10 +11,6 @@ use OCP\IAvatar;
use Sabre\DAV\File;
class AvatarNode extends File {
- private $ext;
- private $size;
- private $avatar;
-
/**
* AvatarNode constructor.
*
@@ -37,10 +18,11 @@ class AvatarNode extends File {
* @param string $ext
* @param IAvatar $avatar
*/
- public function __construct($size, $ext, $avatar) {
- $this->size = $size;
- $this->ext = $ext;
- $this->avatar = $avatar;
+ public function __construct(
+ private $size,
+ private $ext,
+ private $avatar,
+ ) {
}
/**
@@ -87,10 +69,6 @@ class AvatarNode extends File {
}
public function getLastModified() {
- $timestamp = $this->avatar->getFile($this->size)->getMTime();
- if (!empty($timestamp)) {
- return (int)$timestamp;
- }
- return $timestamp;
+ return $this->avatar->getFile($this->size)->getMTime();
}
}