mirror of https://github.com/nextcloud/contacts
run composer cs:fix
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
This commit is contained in:
parent
21c1825787
commit
b173ba79eb
|
@ -25,12 +25,12 @@
|
|||
namespace OCA\Contacts\Controller;
|
||||
|
||||
use OC\App\CompareVersion;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
|
||||
use OCA\Contacts\AppInfo\Application;
|
||||
use OCA\Contacts\Service\SocialApiService;
|
||||
use OCP\App\IAppManager;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\IConfig;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IRequest;
|
||||
|
|
|
@ -33,8 +33,8 @@ use OCA\Contacts\AppInfo\Application;
|
|||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\BackgroundJob\TimedJob;
|
||||
use OCP\IUser;
|
||||
use OCP\IConfig;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserManager;
|
||||
use function method_exists;
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ class MastodonProvider implements ISocialProvider {
|
|||
}
|
||||
$masto_user = trim($masto_user, '/');
|
||||
$masto_server = trim($masto_server, '/');
|
||||
return array($masto_user, $masto_server);
|
||||
return [$masto_user, $masto_server];
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ class SocialApiService {
|
|||
*
|
||||
* @returns {IAddressBook} the corresponding addressbook or null
|
||||
*/
|
||||
protected function getAddressBook(string $addressbookId, IManager $manager = null) : ?IAddressBook {
|
||||
protected function getAddressBook(string $addressbookId, ?IManager $manager = null) : ?IAddressBook {
|
||||
$addressBook = null;
|
||||
if ($manager === null) {
|
||||
$manager = $this->manager;
|
||||
|
@ -367,7 +367,7 @@ 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 {
|
||||
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');
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
|
||||
namespace OCA\Contacts\Controller;
|
||||
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\AppFramework\Http\RedirectResponse;
|
||||
use OCP\IL10N;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\AppFramework\Http\RedirectResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class ContactsControllerTest extends TestCase {
|
||||
private $controller;
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class DiasporaProviderTest extends TestCase {
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class FacebookProviderTest extends TestCase {
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class InstagramProviderTest extends TestCase {
|
||||
private $provider;
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class MastodonProviderTest extends TestCase {
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
|
||||
namespace OCA\Contacts\Service\Social;
|
||||
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class XingProviderTest extends TestCase {
|
||||
|
|
|
@ -24,24 +24,24 @@
|
|||
|
||||
namespace OCA\Contacts\Service;
|
||||
|
||||
use OCA\Contacts\Service\Social\CompositeSocialProvider;
|
||||
use OCA\Contacts\Service\Social\ISocialProvider;
|
||||
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\IConfig;
|
||||
use OCP\Contacts\IManager;
|
||||
use OCP\IAddressBook;
|
||||
use OCA\DAV\CardDAV\CardDavBackend;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IL10N;
|
||||
use OCP\Util;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
use OCA\Contacts\Service\Social\CompositeSocialProvider;
|
||||
|
||||
use OCA\Contacts\Service\Social\ISocialProvider;
|
||||
use OCA\DAV\CardDAV\CardDavBackend;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\Contacts\IManager;
|
||||
use OCP\Http\Client\IClient;
|
||||
use OCP\Http\Client\IClientService;
|
||||
use OCP\Http\Client\IResponse;
|
||||
use OCP\IAddressBook;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
use OCP\Util;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
||||
class SocialApiServiceTest extends TestCase {
|
||||
private SocialApiService $service;
|
||||
|
|
Loading…
Reference in New Issue