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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 16:12:57 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 21:25:24 +0300
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/theming
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/appinfo/routes.php6
-rw-r--r--apps/theming/lib/Controller/ThemingController.php4
-rw-r--r--apps/theming/lib/IconBuilder.php2
-rw-r--r--apps/theming/lib/Settings/Admin.php22
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--apps/theming/lib/Util.php6
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php6
-rw-r--r--apps/theming/tests/ImageManagerTest.php2
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php4
9 files changed, 27 insertions, 27 deletions
diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php
index 527397be985..41b3f02bbf8 100644
--- a/apps/theming/appinfo/routes.php
+++ b/apps/theming/appinfo/routes.php
@@ -61,19 +61,19 @@ return ['routes' => [
'defaults' => ['app' => 'core']
],
[
- 'name' => 'Icon#getFavicon',
+ 'name' => 'Icon#getFavicon',
'url' => '/favicon/{app}',
'verb' => 'GET',
'defaults' => ['app' => 'core'],
],
[
- 'name' => 'Icon#getTouchIcon',
+ 'name' => 'Icon#getTouchIcon',
'url' => '/icon/{app}',
'verb' => 'GET',
'defaults' => ['app' => 'core'],
],
[
- 'name' => 'Icon#getThemedIcon',
+ 'name' => 'Icon#getThemedIcon',
'url' => '/img/{app}/{image}',
'verb' => 'GET',
'requirements' => ['image' => '.+']
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index 56570794247..8957d305883 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -382,8 +382,8 @@ class ThemingController extends Controller {
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getTouchIcon',
['app' => $app]) . '?v=' . $cacheBusterValue,
- 'type'=> 'image/png',
- 'sizes'=> '128x128'
+ 'type' => 'image/png',
+ 'sizes' => '128x128'
],
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getFavicon',
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index 2818f379152..68d1ff311fe 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -164,7 +164,7 @@ class IconBuilder {
$res = $tmp->getImageResolution();
$tmp->destroy();
- if ($x>$y) {
+ if ($x > $y) {
$max = $x;
} else {
$max = $y;
diff --git a/apps/theming/lib/Settings/Admin.php b/apps/theming/lib/Settings/Admin.php
index 518aace2c35..f68a25a3fae 100644
--- a/apps/theming/lib/Settings/Admin.php
+++ b/apps/theming/lib/Settings/Admin.php
@@ -73,18 +73,18 @@ class Admin implements ISettings {
}
$parameters = [
- 'themable' => $themable,
- 'errorMessage' => $errorMessage,
- 'name' => $this->themingDefaults->getEntity(),
- 'url' => $this->themingDefaults->getBaseUrl(),
- 'slogan' => $this->themingDefaults->getSlogan(),
- 'color' => $this->themingDefaults->getColorPrimary(),
+ 'themable' => $themable,
+ 'errorMessage' => $errorMessage,
+ 'name' => $this->themingDefaults->getEntity(),
+ 'url' => $this->themingDefaults->getBaseUrl(),
+ 'slogan' => $this->themingDefaults->getSlogan(),
+ 'color' => $this->themingDefaults->getColorPrimary(),
'uploadLogoRoute' => $this->urlGenerator->linkToRoute('theming.Theming.uploadImage'),
- 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(),
- 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'),
- 'images' => $this->imageManager->getCustomImages(),
- 'imprintUrl' => $this->themingDefaults->getImprintUrl(),
- 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(),
+ 'canThemeIcons' => $this->imageManager->shouldReplaceIcons(),
+ 'iconDocs' => $this->urlGenerator->linkToDocs('admin-theming-icons'),
+ 'images' => $this->imageManager->getCustomImages(),
+ 'imprintUrl' => $this->themingDefaults->getImprintUrl(),
+ 'privacyUrl' => $this->themingDefaults->getPrivacyUrl(),
];
return new TemplateResponse('theming', 'settings-admin', $parameters, '');
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 3fdbc1a61ae..3f0a94e244a 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -372,7 +372,7 @@ class ThemingDefaults extends \OC_Defaults {
*/
private function increaseCacheBuster() {
$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
- $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
+ $this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey + 1);
$this->cacheFactory->createDistributed('theming-')->clear();
$this->cacheFactory->createDistributed('imagePath')->clear();
}
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index 5df132f382c..3addda91422 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -66,7 +66,7 @@ class Util {
*/
public function invertTextColor($color) {
$l = $this->calculateLuma($color);
- if ($l>0.6) {
+ if ($l > 0.6) {
return true;
} else {
return false;
@@ -104,7 +104,7 @@ class Util {
list($red, $green, $blue) = $this->hexToRGB($color);
$compiler = new Compiler();
$hsl = $compiler->toHSL($red, $green, $blue);
- return $hsl[3]/100;
+ return $hsl[3] / 100;
}
/**
@@ -113,7 +113,7 @@ class Util {
*/
public function calculateLuma($color) {
list($red, $green, $blue) = $this->hexToRGB($color);
- return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255;
+ return (0.2126 * $red + 0.7152 * $green + 0.0722 * $blue) / 255;
}
/**
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 5c6763cdd17..18d2d0d4984 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -356,7 +356,7 @@ class ThemingControllerTest extends TestCase {
}
/** @dataProvider dataUpdateImages */
- public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists=true) {
+ public function testUpdateLogoNormalLogoUpload($mimeType, $folderExists = true) {
$tmpLogo = \OC::$server->getTempManager()->getTemporaryFolder() . '/logo.svg';
$destination = \OC::$server->getTempManager()->getTemporaryFolder();
@@ -816,8 +816,8 @@ class ThemingControllerTest extends TestCase {
[
[
'src' => 'touchicon?v=0',
- 'type'=> 'image/png',
- 'sizes'=> '128x128'
+ 'type' => 'image/png',
+ 'sizes' => '128x128'
],
[
'src' => 'favicon?v=0',
diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php
index 81f4a8b98db..08a8fe821f0 100644
--- a/apps/theming/tests/ImageManagerTest.php
+++ b/apps/theming/tests/ImageManagerTest.php
@@ -312,7 +312,7 @@ class ImageManagerTest extends TestCase {
$this->createMock(ISimpleFolder::class),
$this->createMock(ISimpleFolder::class)
];
- foreach ($folders as $index=>$folder) {
+ foreach ($folders as $index => $folder) {
$folder->expects($this->any())
->method('getName')
->willReturn($index);
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index fecde372622..066b8b8ff8d 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -644,8 +644,8 @@ class ThemingDefaultsTest extends TestCase {
->method('createDistributed')
->with('theming-')
->willReturn($this->cache);
- $this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(['foo'=>'bar']);
- $this->assertEquals(['foo'=>'bar'], $this->template->getScssVariables());
+ $this->cache->expects($this->once())->method('get')->with('getScssVariables')->willReturn(['foo' => 'bar']);
+ $this->assertEquals(['foo' => 'bar'], $this->template->getScssVariables());
}
public function testGetScssVariables() {