Browse Source
chore: Run rector on lib/private/Template folder and cleanup more typing
chore: Run rector on lib/private/Template folder and cleanup more typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>pull/55404/head
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
7 changed files with 48 additions and 97 deletions
-
1build/rector.php
-
29lib/private/Template/Base.php
-
76lib/private/Template/JSCombiner.php
-
3lib/private/Template/ResourceLocator.php
-
22lib/private/Template/ResourceNotFoundException.php
-
7lib/private/Template/TemplateManager.php
-
7tests/lib/Template/ResourceLocatorTest.php
@ -1,30 +1,24 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
/** |
|||
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors |
|||
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. |
|||
* SPDX-License-Identifier: AGPL-3.0-only |
|||
*/ |
|||
|
|||
namespace OC\Template; |
|||
|
|||
class ResourceNotFoundException extends \LogicException { |
|||
protected $resource; |
|||
protected $webPath; |
|||
|
|||
/** |
|||
* @param string $resource |
|||
* @param string $webPath |
|||
*/ |
|||
public function __construct($resource, $webPath) { |
|||
public function __construct( |
|||
protected string $resource, |
|||
protected string $webPath, |
|||
) { |
|||
parent::__construct('Resource not found'); |
|||
$this->resource = $resource; |
|||
$this->webPath = $webPath; |
|||
} |
|||
|
|||
/** |
|||
* @return string |
|||
*/ |
|||
public function getResourcePath() { |
|||
public function getResourcePath(): string { |
|||
return $this->webPath . '/' . $this->resource; |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue