Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_retention.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-08-08 22:47:05 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-10-18 17:06:15 +0300
commit15194486f52bb0df0ad26f17d3f4c0e00d6c2503 (patch)
treea72cbc9bb0d95ffe92d205d6694e46f683a02ab5
parentb34dc99ffe7c503149928d75f495a78aeedc959d (diff)
Fix php linting
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--.gitignore2
-rw-r--r--lib/Settings/Admin.php12
-rw-r--r--tests/lib/Contoller/APIControllerTest.php1
3 files changed, 8 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index f332a33..972064c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
# Tests - auto-generated files
-/tests
+/tests/.phpunit.result.cache
/.php-cs-fixer.cache
# Build related files
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php
index cb7f50a..4e2e1aa 100644
--- a/lib/Settings/Admin.php
+++ b/lib/Settings/Admin.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl>
@@ -32,13 +33,12 @@ use OCP\Settings\ISettings;
use OCP\Util;
class Admin implements ISettings {
-
- protected IInitialState $initialStateService;
+ protected IInitialState $initialState;
protected IURLGenerator $url;
protected IConfig $config;
- public function __construct(IInitialState $initialStateService, IURLGenerator $url, IConfig $config) {
- $this->initialStateService = $initialStateService;
+ public function __construct(IInitialState $initialState, IURLGenerator $url, IConfig $config) {
+ $this->initialState = $initialState;
$this->url = $url;
$this->config = $config;
}
@@ -46,12 +46,12 @@ class Admin implements ISettings {
public function getForm(): TemplateResponse {
Util::addScript('files_retention', 'files_retention-main');
- $this->initialStateService->provideInitialState(
+ $this->initialState->provideInitialState(
'doc-url',
$this->url->linkToDocs('admin-files-retention')
);
- $this->initialStateService->provideInitialState(
+ $this->initialState->provideInitialState(
'notify_before',
$this->config->getAppValue(Application::APP_ID, 'notify_before', 'no') === 'yes'
);
diff --git a/tests/lib/Contoller/APIControllerTest.php b/tests/lib/Contoller/APIControllerTest.php
index d2fe7d5..21c9277 100644
--- a/tests/lib/Contoller/APIControllerTest.php
+++ b/tests/lib/Contoller/APIControllerTest.php
@@ -55,6 +55,7 @@ class APIControllerTest extends \Test\TestCase {
/** @var IJobList|MockObject */
private $jobList;
+
private APIController $api;
protected function setUp(): void {