summaryrefslogtreecommitdiffstats
path: root/apps/accessibility
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 15:12:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 20:25:24 +0200
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/accessibility
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
downloadnextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz
nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/accessibility')
-rw-r--r--apps/accessibility/appinfo/routes.php6
-rw-r--r--apps/accessibility/lib/AccessibilityProvider.php22
-rw-r--r--apps/accessibility/lib/Controller/AccessibilityController.php30
-rw-r--r--apps/accessibility/lib/Controller/ConfigController.php10
-rw-r--r--apps/accessibility/lib/Settings/Personal.php18
-rw-r--r--apps/accessibility/lib/Settings/PersonalSection.php4
6 files changed, 45 insertions, 45 deletions
diff --git a/apps/accessibility/appinfo/routes.php b/apps/accessibility/appinfo/routes.php
index da0bfdbd18f..02bf52eac7e 100644
--- a/apps/accessibility/appinfo/routes.php
+++ b/apps/accessibility/appinfo/routes.php
@@ -31,17 +31,17 @@ return [
'ocs' => [
[
'name' => 'Config#getConfig',
- 'url' => '/api/v1/config',
+ 'url' => '/api/v1/config',
'verb' => 'GET',
],
[
'name' => 'Config#setConfig',
- 'url' => '/api/v1/config/{key}',
+ 'url' => '/api/v1/config/{key}',
'verb' => 'PUT',
],
[
'name' => 'Config#deleteConfig',
- 'url' => '/api/v1/config/{key}',
+ 'url' => '/api/v1/config/{key}',
'verb' => 'DELETE',
],
]
diff --git a/apps/accessibility/lib/AccessibilityProvider.php b/apps/accessibility/lib/AccessibilityProvider.php
index 1325c731662..09182eba626 100644
--- a/apps/accessibility/lib/AccessibilityProvider.php
+++ b/apps/accessibility/lib/AccessibilityProvider.php
@@ -53,41 +53,41 @@ class AccessibilityProvider {
public function __construct(string $appName,
IURLGenerator $urlGenerator,
IL10N $l) {
- $this->appName = $appName;
+ $this->appName = $appName;
$this->urlGenerator = $urlGenerator;
- $this->l = $l;
+ $this->l = $l;
}
public function getThemes() {
return [
[
- 'id' => 'dark',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'theme-dark.jpg'),
+ 'id' => 'dark',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'theme-dark.jpg'),
'title' => $this->l->t('Dark theme'),
'enableLabel' => $this->l->t('Enable dark theme'),
- 'text' => $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.')
+ 'text' => $this->l->t('A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.')
]
];
}
public function getHighContrast() {
return [
- 'id' => 'highcontrast',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'),
+ 'id' => 'highcontrast',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'mode-highcontrast.jpg'),
'title' => $this->l->t('High contrast mode'),
'enableLabel' => $this->l->t('Enable high contrast mode'),
- 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.')
+ 'text' => $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.')
];
}
public function getFonts() {
return [
[
- 'id' => 'fontdyslexic',
- 'img' => $this->urlGenerator->imagePath($this->appName, 'font-opendyslexic.jpg'),
+ 'id' => 'fontdyslexic',
+ 'img' => $this->urlGenerator->imagePath($this->appName, 'font-opendyslexic.jpg'),
'title' => $this->l->t('Dyslexia font'),
'enableLabel' => $this->l->t('Enable dyslexia font'),
- 'text' => $this->l->t('OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.')
+ 'text' => $this->l->t('OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.')
]
];
}
diff --git a/apps/accessibility/lib/Controller/AccessibilityController.php b/apps/accessibility/lib/Controller/AccessibilityController.php
index 9ea6e110193..5c732816b8a 100644
--- a/apps/accessibility/lib/Controller/AccessibilityController.php
+++ b/apps/accessibility/lib/Controller/AccessibilityController.php
@@ -113,19 +113,19 @@ class AccessibilityController extends Controller {
IconsCacher $iconsCacher,
\OC_Defaults $defaults) {
parent::__construct($appName, $request);
- $this->appName = $appName;
- $this->config = $config;
- $this->userManager = $userManager;
- $this->logger = $logger;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userManager = $userManager;
+ $this->logger = $logger;
$this->urlGenerator = $urlGenerator;
- $this->timeFactory = $timeFactory;
- $this->userSession = $userSession;
- $this->appManager = $appManager;
- $this->iconsCacher = $iconsCacher;
- $this->defaults = $defaults;
+ $this->timeFactory = $timeFactory;
+ $this->userSession = $userSession;
+ $this->appManager = $appManager;
+ $this->iconsCacher = $iconsCacher;
+ $this->defaults = $defaults;
$this->serverRoot = \OC::$SERVERROOT;
- $this->appRoot = $this->appManager->getAppPath($this->appName);
+ $this->appRoot = $this->appManager->getAppPath($this->appName);
}
/**
@@ -136,8 +136,8 @@ class AccessibilityController extends Controller {
* @return DataDisplayResponse
*/
public function getCss(): DataDisplayResponse {
- $css = '';
- $imports = '';
+ $css = '';
+ $imports = '';
if ($this->userSession->isLoggedIn()) {
$userValues = $this->getUserValues();
} else {
@@ -182,7 +182,7 @@ class AccessibilityController extends Controller {
// Rebase all urls
$appWebRoot = substr($this->appRoot, strlen($this->serverRoot) - strlen(\OC::$WEBROOT));
- $css = $this->rebaseUrls($css, $appWebRoot . '/css');
+ $css = $this->rebaseUrls($css, $appWebRoot . '/css');
if (in_array('dark', $userValues) && $this->iconsCacher->getCachedList() && $this->iconsCacher->getCachedList()->getSize() > 0) {
$iconsCss = $this->invertSvgIconsColor($this->iconsCacher->getCachedList()->getContent());
@@ -215,7 +215,7 @@ class AccessibilityController extends Controller {
*/
private function getUserValues(): array {
$userTheme = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false);
- $userFont = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false);
+ $userFont = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false);
$userHighContrast = $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'highcontrast', false);
return [$userTheme, $userHighContrast, $userFont];
@@ -240,7 +240,7 @@ class AccessibilityController extends Controller {
* @return string
*/
private function rebaseUrls(string $css, string $webDir): string {
- $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x';
+ $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x';
$subst = 'url(\'' . $webDir . '/$1\')';
return preg_replace($re, $subst, $css);
diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php
index a66a69a3a73..5f2f77ed3e1 100644
--- a/apps/accessibility/lib/Controller/ConfigController.php
+++ b/apps/accessibility/lib/Controller/ConfigController.php
@@ -75,11 +75,11 @@ class ConfigController extends OCSController {
IUserSession $userSession,
AccessibilityProvider $accessibilityProvider) {
parent::__construct($appName, $request);
- $this->appName = $appName;
- $this->config = $config;
- $this->userSession = $userSession;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userSession = $userSession;
$this->accessibilityProvider = $accessibilityProvider;
- $this->userId = $userSession->getUser()->getUID();
+ $this->userId = $userSession->getUser()->getUID();
}
/**
@@ -115,7 +115,7 @@ class ConfigController extends OCSController {
$themes = $this->accessibilityProvider->getThemes();
$highcontrast = [$this->accessibilityProvider->getHighContrast()];
- $fonts = $this->accessibilityProvider->getFonts();
+ $fonts = $this->accessibilityProvider->getFonts();
$availableOptions = array_map(function ($option) {
return $option['id'];
diff --git a/apps/accessibility/lib/Settings/Personal.php b/apps/accessibility/lib/Settings/Personal.php
index 3f687bc1b6e..b1cff20fac8 100644
--- a/apps/accessibility/lib/Settings/Personal.php
+++ b/apps/accessibility/lib/Settings/Personal.php
@@ -74,13 +74,13 @@ class Personal implements ISettings {
IURLGenerator $urlGenerator,
AccessibilityProvider $accessibilityProvider,
IInitialStateService $initialStateService) {
- $this->appName = $appName;
- $this->config = $config;
- $this->userSession = $userSession;
- $this->l = $l;
- $this->urlGenerator = $urlGenerator;
+ $this->appName = $appName;
+ $this->config = $config;
+ $this->userSession = $userSession;
+ $this->l = $l;
+ $this->urlGenerator = $urlGenerator;
$this->accessibilityProvider = $accessibilityProvider;
- $this->initialStateService = $initialStateService;
+ $this->initialStateService = $initialStateService;
}
/**
@@ -93,14 +93,14 @@ class Personal implements ISettings {
$availableConfig = [
'themes' => $this->accessibilityProvider->getThemes(),
- 'fonts' => $this->accessibilityProvider->getFonts(),
+ 'fonts' => $this->accessibilityProvider->getFonts(),
'highcontrast' => $this->accessibilityProvider->getHighContrast()
];
$userConfig = [
'highcontrast' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'highcontrast', false),
- 'theme' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false),
- 'font' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false)
+ 'theme' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'theme', false),
+ 'font' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false)
];
$this->initialStateService->provideInitialState($this->appName, 'available-config', $availableConfig);
diff --git a/apps/accessibility/lib/Settings/PersonalSection.php b/apps/accessibility/lib/Settings/PersonalSection.php
index c925ceec2c6..ab61bbbdf30 100644
--- a/apps/accessibility/lib/Settings/PersonalSection.php
+++ b/apps/accessibility/lib/Settings/PersonalSection.php
@@ -48,9 +48,9 @@ class PersonalSection implements IIconSection {
public function __construct(string $appName,
IURLGenerator $urlGenerator,
IL10N $l) {
- $this->appName = $appName;
+ $this->appName = $appName;
$this->urlGenerator = $urlGenerator;
- $this->l = $l;
+ $this->l = $l;
}
/**