Passed
Push — master ( 5bf96e...cad2e4 )
by Christoph
16:18 queued 13s
created
apps/settings/lib/Controller/HelpController.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -40,68 +40,68 @@
 block discarded – undo
40 40
 
41 41
 class HelpController extends Controller {
42 42
 
43
-	/** @var INavigationManager */
44
-	private $navigationManager;
45
-	/** @var IURLGenerator */
46
-	private $urlGenerator;
47
-	/** @var IGroupManager */
48
-	private $groupManager;
49
-	/** @var IL10N */
50
-	private $l10n;
43
+    /** @var INavigationManager */
44
+    private $navigationManager;
45
+    /** @var IURLGenerator */
46
+    private $urlGenerator;
47
+    /** @var IGroupManager */
48
+    private $groupManager;
49
+    /** @var IL10N */
50
+    private $l10n;
51 51
 
52
-	/** @var string */
53
-	private $userId;
52
+    /** @var string */
53
+    private $userId;
54 54
 
55
-	public function __construct(
56
-		string $appName,
57
-		IRequest $request,
58
-		INavigationManager $navigationManager,
59
-		IURLGenerator $urlGenerator,
60
-		?string $userId,
61
-		IGroupManager $groupManager,
62
-		IL10N $l10n
63
-	) {
64
-		parent::__construct($appName, $request);
65
-		$this->navigationManager = $navigationManager;
66
-		$this->urlGenerator = $urlGenerator;
67
-		$this->userId = $userId;
68
-		$this->groupManager = $groupManager;
69
-		$this->l10n = $l10n;
70
-	}
55
+    public function __construct(
56
+        string $appName,
57
+        IRequest $request,
58
+        INavigationManager $navigationManager,
59
+        IURLGenerator $urlGenerator,
60
+        ?string $userId,
61
+        IGroupManager $groupManager,
62
+        IL10N $l10n
63
+    ) {
64
+        parent::__construct($appName, $request);
65
+        $this->navigationManager = $navigationManager;
66
+        $this->urlGenerator = $urlGenerator;
67
+        $this->userId = $userId;
68
+        $this->groupManager = $groupManager;
69
+        $this->l10n = $l10n;
70
+    }
71 71
 
72
-	/**
73
-	 * @return TemplateResponse
74
-	 *
75
-	 * @NoCSRFRequired
76
-	 * @NoAdminRequired
77
-	 * @NoSubAdminRequired
78
-	 */
79
-	public function help(string $mode = 'user'): TemplateResponse {
80
-		$this->navigationManager->setActiveEntry('help');
81
-		$pageTitle = $this->l10n->t('Administrator documentation');
82
-		if ($mode !== 'admin') {
83
-			$pageTitle = $this->l10n->t('User documentation');
84
-			$mode = 'user';
85
-		}
72
+    /**
73
+     * @return TemplateResponse
74
+     *
75
+     * @NoCSRFRequired
76
+     * @NoAdminRequired
77
+     * @NoSubAdminRequired
78
+     */
79
+    public function help(string $mode = 'user'): TemplateResponse {
80
+        $this->navigationManager->setActiveEntry('help');
81
+        $pageTitle = $this->l10n->t('Administrator documentation');
82
+        if ($mode !== 'admin') {
83
+            $pageTitle = $this->l10n->t('User documentation');
84
+            $mode = 'user';
85
+        }
86 86
 
87
-		$documentationUrl = $this->urlGenerator->getAbsoluteURL(
88
-			$this->urlGenerator->linkTo('', 'core/doc/' . $mode . '/index.html')
89
-		);
87
+        $documentationUrl = $this->urlGenerator->getAbsoluteURL(
88
+            $this->urlGenerator->linkTo('', 'core/doc/' . $mode . '/index.html')
89
+        );
90 90
 
91
-		$urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']);
92
-		$urlAdminDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'admin']);
91
+        $urlUserDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'user']);
92
+        $urlAdminDocs = $this->urlGenerator->linkToRoute('settings.Help.help', ['mode' => 'admin']);
93 93
 
94
-		$response = new TemplateResponse('settings', 'help', [
95
-			'admin' => $this->groupManager->isAdmin($this->userId),
96
-			'url' => $documentationUrl,
97
-			'urlUserDocs' => $urlUserDocs,
98
-			'urlAdminDocs' => $urlAdminDocs,
99
-			'mode' => $mode,
100
-			'pageTitle' => $pageTitle,
101
-		]);
102
-		$policy = new ContentSecurityPolicy();
103
-		$policy->addAllowedFrameDomain('\'self\'');
104
-		$response->setContentSecurityPolicy($policy);
105
-		return $response;
106
-	}
94
+        $response = new TemplateResponse('settings', 'help', [
95
+            'admin' => $this->groupManager->isAdmin($this->userId),
96
+            'url' => $documentationUrl,
97
+            'urlUserDocs' => $urlUserDocs,
98
+            'urlAdminDocs' => $urlAdminDocs,
99
+            'mode' => $mode,
100
+            'pageTitle' => $pageTitle,
101
+        ]);
102
+        $policy = new ContentSecurityPolicy();
103
+        $policy->addAllowedFrameDomain('\'self\'');
104
+        $response->setContentSecurityPolicy($policy);
105
+        return $response;
106
+    }
107 107
 }
Please login to merge, or discard this patch.