Automatic code-style fix

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2020-04-15 13:06:37 +02:00
parent 99ebda920f
commit 5402ea8949
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
14 changed files with 31 additions and 18 deletions

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -198,7 +199,7 @@ class ContactController extends Controller {
}
$match = false;
foreach($r['EMAIL'] as $email) {
foreach ($r['EMAIL'] as $email) {
if ($email === $search) {
$match = true;
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @author Thomas Citharel
@ -126,7 +127,7 @@ class EmailController extends Controller {
try {
$this->mailer->send($message);
} catch(\Exception $ex) {
} catch (\Exception $ex) {
return new JSONResponse([
'message' => $this->l10n->t('Unexpected error sending email. Please contact your administrator.'),
], Http::STATUS_INTERNAL_SERVER_ERROR);

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -110,7 +111,7 @@ class SettingsController extends Controller {
'currentView',
$view
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -135,7 +136,7 @@ class SettingsController extends Controller {
'skipPopover',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -160,7 +161,7 @@ class SettingsController extends Controller {
'showWeekends',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -185,7 +186,7 @@ class SettingsController extends Controller {
'showWeekNr',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -205,7 +206,7 @@ class SettingsController extends Controller {
'firstRun',
'no'
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -226,7 +227,7 @@ class SettingsController extends Controller {
'timezone',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -251,7 +252,7 @@ class SettingsController extends Controller {
'eventLimit',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@ -276,7 +277,7 @@ class SettingsController extends Controller {
'slotDuration',
$value
);
} catch(\Exception $e) {
} catch (\Exception $e) {
return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -65,7 +66,7 @@ class CurrentViewNameRepairStep implements IRepairStep {
* @param IOutput $output
*/
public function run(IOutput $output):void {
$this->userManager->callForSeenUsers(function(IUser $user) {
$this->userManager->callForSeenUsers(function (IUser $user) {
$userId = $user->getUID();
$savedView = $this->config->getUserValue($userId, 'calendar', 'currentView', null);

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -80,8 +81,8 @@ class ContactControllerTest extends TestCase {
[
'FN' => 'Person 1',
'ADR' => [
'33 42nd Street;Random Town;Some State;;United States',
';;5 Random Ave;12782 Some big city;Yet another state;United States',
'33 42nd Street;Random Town;Some State;;United States',
';;5 Random Ave;12782 Some big city;Yet another state;United States',
],
'EMAIL' => [
'foo1@example.com',

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -84,7 +85,7 @@ class EmailControllerTest extends TestCase {
$this->l10n->expects($this->any())
->method('t')
->willReturnCallback(function($string, $args) {
->willReturnCallback(function ($string, $args) {
return 'TRANSLATED: ' . vsprintf($string, $args);
});
@ -347,5 +348,4 @@ class EmailControllerTest extends TestCase {
], $response->getData());
$this->assertEquals(200, $response->getStatus());
}
}

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -62,7 +63,7 @@ class SettingsControllerTest extends TestCase {
* @dataProvider setViewWithAllowedViewDataProvider
*/
public function testSetViewWithAllowedView(string $view,
int $expectedStatusCode):void {
int $expectedStatusCode):void {
if ($expectedStatusCode === 200) {
$this->config->expects($this->once())
->method('setUserValue')
@ -202,7 +203,7 @@ class SettingsControllerTest extends TestCase {
* @dataProvider setShowWeekendsWithAllowedValueDataProvider
*/
public function testSetShowWeekendsWithAllowedValue(string $value,
int $expectedStatusCode):void {
int $expectedStatusCode):void {
if ($expectedStatusCode === 200) {
$this->config->expects($this->once())
->method('setUserValue')

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App

View File

@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* Calendar App
@ -56,7 +57,7 @@ class CurrentViewNameRepairStepTest extends TestCase {
public function testRun():void {
$this->userManager->expects($this->once())
->method('callForSeenUsers')
->with($this->callback(function($fn) {
->with($this->callback(function ($fn) {
$user1 = $this->createMock(IUser::class);
$user1->method('getUID')->willReturn('user1');