aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/JSCombiner.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Template/JSCombiner.php')
-rw-r--r--lib/private/Template/JSCombiner.php50
1 files changed, 10 insertions, 40 deletions
diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php
index 89ef9787f17..a94f822a448 100644
--- a/lib/private/Template/JSCombiner.php
+++ b/lib/private/Template/JSCombiner.php
@@ -1,30 +1,9 @@
<?php
+
/**
- * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Template;
use OC\SystemConfig;
@@ -34,11 +13,10 @@ use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\ICache;
use OCP\ICacheFactory;
-use OCP\ILogger;
use OCP\IURLGenerator;
+use Psr\Log\LoggerInterface;
class JSCombiner {
-
/** @var IAppData */
protected $appData;
@@ -51,24 +29,16 @@ class JSCombiner {
/** @var SystemConfig */
protected $config;
- /** @var ILogger */
- protected $logger;
+ protected LoggerInterface $logger;
/** @var ICacheFactory */
private $cacheFactory;
- /**
- * @param IAppData $appData
- * @param IURLGenerator $urlGenerator
- * @param ICacheFactory $cacheFactory
- * @param SystemConfig $config
- * @param ILogger $logger
- */
public function __construct(IAppData $appData,
- IURLGenerator $urlGenerator,
- ICacheFactory $cacheFactory,
- SystemConfig $config,
- ILogger $logger) {
+ IURLGenerator $urlGenerator,
+ ICacheFactory $cacheFactory,
+ SystemConfig $config,
+ LoggerInterface $logger) {
$this->appData = $appData;
$this->urlGenerator = $urlGenerator;
$this->cacheFactory = $cacheFactory;
@@ -207,7 +177,7 @@ class JSCombiner {
$gzipFile->putContent(gzencode($res, 9));
$this->logger->debug('JSCombiner: successfully cached: ' . $fileName);
return true;
- } catch (NotPermittedException $e) {
+ } catch (NotPermittedException|NotFoundException $e) {
$this->logger->error('JSCombiner: unable to cache: ' . $fileName);
return false;
}