aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/TXT.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Preview/TXT.php')
-rw-r--r--lib/private/Preview/TXT.php34
1 files changed, 6 insertions, 28 deletions
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php
index f5a68f92be4..1a1d64f3e08 100644
--- a/lib/private/Preview/TXT.php
+++ b/lib/private/Preview/TXT.php
@@ -1,31 +1,9 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Georg Ehrke <oc.list@georgehrke.com>
- * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Nmz <nemesiz@nmz.lt>
- * @author Robin Appelman <robin@icewind.nl>
- * @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: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Preview;
@@ -72,7 +50,7 @@ class TXT extends ProviderV2 {
$lines = preg_split("/\r\n|\n|\r/", $content);
// Define text size of text file preview
- $fontSize = $maxX ? (int) ((1 / 32) * $maxX) : 5; //5px
+ $fontSize = $maxX ? (int)((1 / 32) * $maxX) : 5; //5px
$lineSize = ceil($fontSize * 1.5);
$image = imagecreate($maxX, $maxY);
@@ -89,7 +67,7 @@ class TXT extends ProviderV2 {
$index = $index + 1;
$x = 1;
- $y = (int) ($index * $lineSize);
+ $y = (int)($index * $lineSize);
if ($canUseTTF === true) {
imagettftext($image, $fontSize, 0, $x, $y, $textColor, $fontFile, $line);