summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2023-01-16 11:44:04 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2023-01-20 16:04:51 +0100
commit2b369fc7321f147542cd34becc0ea4623f06e13a (patch)
tree08e020a0d9dd460fc57259acfe5b72e6625dd2f2
parentc3c43ab230e61b664ab07b5d6a2d003109259657 (diff)
chore: run composer cs:check
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
-rw-r--r--lib/ContactsMenu/Providers/DetailsProvider.php1
-rw-r--r--lib/Controller/ContactsController.php1
-rw-r--r--lib/Cron/SocialUpdateRegistration.php2
-rw-r--r--lib/Service/Social/CompositeSocialProvider.php2
-rw-r--r--lib/Service/Social/DiasporaProvider.php1
-rw-r--r--lib/Service/Social/FacebookProvider.php1
-rw-r--r--lib/Service/Social/InstagramProvider.php1
-rw-r--r--lib/Service/Social/MastodonProvider.php1
-rw-r--r--lib/Service/Social/XingProvider.php1
-rw-r--r--lib/Service/SocialApiService.php1
-rw-r--r--tests/unit/ContactsMenu/Provider/DetailsProviderTest.php1
-rw-r--r--tests/unit/Service/ImageResizerTest.php1
-rw-r--r--tests/unit/Service/Social/DiasporaProviderTest.php2
-rw-r--r--tests/unit/Service/Social/FacebookProviderTest.php2
-rw-r--r--tests/unit/Service/Social/InstagramProviderTest.php6
-rw-r--r--tests/unit/Service/Social/MastodonProviderTest.php2
-rw-r--r--tests/unit/Service/Social/XingProviderTest.php2
-rw-r--r--tests/unit/Service/SocialApiServiceTest.php18
18 files changed, 16 insertions, 30 deletions
diff --git a/lib/ContactsMenu/Providers/DetailsProvider.php b/lib/ContactsMenu/Providers/DetailsProvider.php
index e4a24931..6988edb9 100644
--- a/lib/ContactsMenu/Providers/DetailsProvider.php
+++ b/lib/ContactsMenu/Providers/DetailsProvider.php
@@ -32,7 +32,6 @@ use OCP\IL10N;
use OCP\IURLGenerator;
class DetailsProvider implements IProvider {
-
/** @var IURLGenerator */
private $urlGenerator;
diff --git a/lib/Controller/ContactsController.php b/lib/Controller/ContactsController.php
index 061bed31..7b42e5ac 100644
--- a/lib/Controller/ContactsController.php
+++ b/lib/Controller/ContactsController.php
@@ -31,7 +31,6 @@ use OCP\IRequest;
use OCP\IURLGenerator;
class ContactsController extends Controller {
-
/** @var IL10N */
private $l10n;
diff --git a/lib/Cron/SocialUpdateRegistration.php b/lib/Cron/SocialUpdateRegistration.php
index da8f24c0..664b921e 100644
--- a/lib/Cron/SocialUpdateRegistration.php
+++ b/lib/Cron/SocialUpdateRegistration.php
@@ -83,7 +83,6 @@ class SocialUpdateRegistration extends TimedJob {
* @inheritDoc
*/
protected function run($arguments) {
-
// check if admin allows for social updates:
$syncAllowedByAdmin = $this->config->getAppValue($this->appName, 'allowSocialSync', 'yes');
if (!($syncAllowedByAdmin === 'yes')) {
@@ -91,7 +90,6 @@ class SocialUpdateRegistration extends TimedJob {
}
$this->userManager->callForSeenUsers(function (IUser $user) {
-
// check that user opted-in:
$bgSyncEnabledByUser = $this->config->getUserValue($user->getUID(), $this->appName, 'enableSocialSync', 'no');
if ($bgSyncEnabledByUser === 'yes' && $user->isEnabled()) {
diff --git a/lib/Service/Social/CompositeSocialProvider.php b/lib/Service/Social/CompositeSocialProvider.php
index f3a58407..c7e6e2c7 100644
--- a/lib/Service/Social/CompositeSocialProvider.php
+++ b/lib/Service/Social/CompositeSocialProvider.php
@@ -27,7 +27,6 @@ namespace OCA\Contacts\Service\Social;
* Composition of all social providers for easier usage
*/
class CompositeSocialProvider {
-
/** @var ISocialProvider[] */
private $providers;
@@ -40,7 +39,6 @@ class CompositeSocialProvider {
XingProvider $xingProvider,
TelegramProvider $telegramProvider,
GravatarProvider $gravatarProvider) {
-
// This determines the priority of known providers
$this->providers = [
$instagramProvider->name => $instagramProvider,
diff --git a/lib/Service/Social/DiasporaProvider.php b/lib/Service/Social/DiasporaProvider.php
index ae639212..08076250 100644
--- a/lib/Service/Social/DiasporaProvider.php
+++ b/lib/Service/Social/DiasporaProvider.php
@@ -26,7 +26,6 @@ namespace OCA\Contacts\Service\Social;
use OCP\Http\Client\IClientService;
class DiasporaProvider implements ISocialProvider {
-
/** @var IClientService */
private $httpClient;
diff --git a/lib/Service/Social/FacebookProvider.php b/lib/Service/Social/FacebookProvider.php
index ac609449..4ea79d87 100644
--- a/lib/Service/Social/FacebookProvider.php
+++ b/lib/Service/Social/FacebookProvider.php
@@ -26,7 +26,6 @@ namespace OCA\Contacts\Service\Social;
use OCP\Http\Client\IClientService;
class FacebookProvider implements ISocialProvider {
-
/** @var IClientService */
private $httpClient;
diff --git a/lib/Service/Social/InstagramProvider.php b/lib/Service/Social/InstagramProvider.php
index c8fc2135..a61e36be 100644
--- a/lib/Service/Social/InstagramProvider.php
+++ b/lib/Service/Social/InstagramProvider.php
@@ -31,7 +31,6 @@ use OCP\Http\Client\IClientService;
use Psr\Log\LoggerInterface;
class InstagramProvider implements ISocialProvider {
-
/** @var IClientService */
private $httpClient;
diff --git a/lib/Service/Social/MastodonProvider.php b/lib/Service/Social/MastodonProvider.php
index a5db02a3..7f94370f 100644
--- a/lib/Service/Social/MastodonProvider.php
+++ b/lib/Service/Social/MastodonProvider.php
@@ -26,7 +26,6 @@ namespace OCA\Contacts\Service\Social;
use OCP\Http\Client\IClientService;
class MastodonProvider implements ISocialProvider {
-
/** @var IClientService */
private $httpClient;
diff --git a/lib/Service/Social/XingProvider.php b/lib/Service/Social/XingProvider.php
index 14ebe2e8..78443d56 100644
--- a/lib/Service/Social/XingProvider.php
+++ b/lib/Service/Social/XingProvider.php
@@ -26,7 +26,6 @@ namespace OCA\Contacts\Service\Social;
use OCP\Http\Client\IClientService;
class XingProvider implements ISocialProvider {
-
/** @var IClientService */
private $httpClient;
diff --git a/lib/Service/SocialApiService.php b/lib/Service/SocialApiService.php
index 397d8c30..ef0dfb83 100644
--- a/lib/Service/SocialApiService.php
+++ b/lib/Service/SocialApiService.php
@@ -368,7 +368,6 @@ class SocialApiService {
* @returns {JSONResponse} JSONResponse with the list of changed and failed contacts
*/
public function updateAddressbooks(string $userId, string $offsetBook = null, string $offsetContact = null, string $network = null) : JSONResponse {
-
// double check!
$syncAllowedByAdmin = $this->config->getAppValue($this->appName, 'allowSocialSync', 'yes');
$bgSyncEnabledByUser = $this->config->getUserValue($userId, $this->appName, 'enableSocialSync', 'no');
diff --git a/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php b/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
index 59bd169f..af1acb64 100644
--- a/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
+++ b/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
@@ -37,7 +37,6 @@ use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase as Base;
class DetailsProviderTest extends Base {
-
/** @var IURLGenerator|MockObject */
private $urlGenerator;
diff --git a/tests/unit/Service/ImageResizerTest.php b/tests/unit/Service/ImageResizerTest.php
index 00d569d5..5f5a57e9 100644
--- a/tests/unit/Service/ImageResizerTest.php
+++ b/tests/unit/Service/ImageResizerTest.php
@@ -27,7 +27,6 @@ namespace OCA\Contacts\Service;
use ChristophWurst\Nextcloud\Testing\TestCase;
class ImageResizerTest extends TestCase {
-
/** @var ImageResizer */
private $imageResizer;
diff --git a/tests/unit/Service/Social/DiasporaProviderTest.php b/tests/unit/Service/Social/DiasporaProviderTest.php
index 07e65d06..ab48866d 100644
--- a/tests/unit/Service/Social/DiasporaProviderTest.php
+++ b/tests/unit/Service/Social/DiasporaProviderTest.php
@@ -53,7 +53,7 @@ class DiasporaProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new DiasporaProvider(
- $this->clientService
+ $this->clientService
);
}
diff --git a/tests/unit/Service/Social/FacebookProviderTest.php b/tests/unit/Service/Social/FacebookProviderTest.php
index a386543c..fd55b718 100644
--- a/tests/unit/Service/Social/FacebookProviderTest.php
+++ b/tests/unit/Service/Social/FacebookProviderTest.php
@@ -53,7 +53,7 @@ class FacebookProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new FacebookProvider(
- $this->clientService
+ $this->clientService
);
}
diff --git a/tests/unit/Service/Social/InstagramProviderTest.php b/tests/unit/Service/Social/InstagramProviderTest.php
index 1cf70ceb..fc032651 100644
--- a/tests/unit/Service/Social/InstagramProviderTest.php
+++ b/tests/unit/Service/Social/InstagramProviderTest.php
@@ -58,7 +58,7 @@ class InstagramProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new InstagramProvider(
- $this->clientService, $this->logger
+ $this->clientService, $this->logger
);
}
@@ -104,10 +104,10 @@ class InstagramProviderTest extends TestCase {
];
$contactWithSocialJson = [
json_encode(
- ["graphql" => ["user" => ["profile_pic_url_hd" => "username1.jpg"]]]
+ ["graphql" => ["user" => ["profile_pic_url_hd" => "username1.jpg"]]]
),
json_encode(
- ["graphql" => ["user" => ["profile_pic_url_hd" => "username2.jpg"]]]
+ ["graphql" => ["user" => ["profile_pic_url_hd" => "username2.jpg"]]]
)
];
$contactWithSocialImgs = [
diff --git a/tests/unit/Service/Social/MastodonProviderTest.php b/tests/unit/Service/Social/MastodonProviderTest.php
index db1d6fc3..5add27c1 100644
--- a/tests/unit/Service/Social/MastodonProviderTest.php
+++ b/tests/unit/Service/Social/MastodonProviderTest.php
@@ -53,7 +53,7 @@ class MastodonProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new MastodonProvider(
- $this->clientService
+ $this->clientService
);
}
diff --git a/tests/unit/Service/Social/XingProviderTest.php b/tests/unit/Service/Social/XingProviderTest.php
index e0853257..ec9280f3 100644
--- a/tests/unit/Service/Social/XingProviderTest.php
+++ b/tests/unit/Service/Social/XingProviderTest.php
@@ -53,7 +53,7 @@ class XingProviderTest extends TestCase {
->willReturn($this->client);
$this->provider = new XingProvider(
- $this->clientService
+ $this->clientService
);
}
diff --git a/tests/unit/Service/SocialApiServiceTest.php b/tests/unit/Service/SocialApiServiceTest.php
index 622610a4..a45d2543 100644
--- a/tests/unit/Service/SocialApiServiceTest.php
+++ b/tests/unit/Service/SocialApiServiceTest.php
@@ -185,9 +185,9 @@ class SocialApiServiceTest extends TestCase {
$result = $this->service
->updateContact(
- 'contacts',
- '3225c0d5-1bd2-43e5-a08c-4e65eaa406b0',
- null);
+ 'contacts',
+ '3225c0d5-1bd2-43e5-a08c-4e65eaa406b0',
+ null);
$this->assertEquals($status, $result->getStatus());
}
@@ -257,9 +257,9 @@ class SocialApiServiceTest extends TestCase {
$result = $this->service
->updateContact(
- $addressBookId,
- $contactId,
- $network);
+ $addressBookId,
+ $contactId,
+ $network);
$this->assertEquals(Http::STATUS_OK, $result->getStatus());
}
@@ -330,9 +330,9 @@ class SocialApiServiceTest extends TestCase {
$result = $this->service
->updateContact(
- $addressBookId,
- $contactId,
- $network);
+ $addressBookId,
+ $contactId,
+ $network);
$this->assertEquals(Http::STATUS_OK, $result->getStatus());
}