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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2022-04-06 18:43:03 +0300
committerVitor Mattos <vitor@php.rio>2022-04-06 18:43:03 +0300
commitc07251f0c67d3c02debe1f6dbe0e12ee3fe9f99a (patch)
treebe06389952fa3dee69071af38e872ec350da3a96 /lib/Service
parentf7505e0d59b8343bc0405286fdf9c8b4da27d3dc (diff)
Use PHP7.4 property typehinting where possible
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/CommandService.php7
-rw-r--r--lib/Service/HostedSignalingServerService.php16
-rw-r--r--lib/Service/MembershipService.php10
-rw-r--r--lib/Service/ParticipantService.php45
-rw-r--r--lib/Service/RoomService.php13
-rw-r--r--lib/Service/SessionService.php9
6 files changed, 33 insertions, 67 deletions
diff --git a/lib/Service/CommandService.php b/lib/Service/CommandService.php
index 1c43f77ca..94c3fc62c 100644
--- a/lib/Service/CommandService.php
+++ b/lib/Service/CommandService.php
@@ -29,12 +29,9 @@ use OCA\Talk\Model\CommandMapper;
use OCP\AppFramework\Db\DoesNotExistException;
class CommandService {
+ protected CommandMapper $mapper;
- /** @var CommandMapper */
- protected $mapper;
-
- /** @var ShellExecutor */
- protected $shellExecutor;
+ protected ShellExecutor $shellExecutor;
public function __construct(CommandMapper $mapper, ShellExecutor $shellExecutor) {
$this->mapper = $mapper;
diff --git a/lib/Service/HostedSignalingServerService.php b/lib/Service/HostedSignalingServerService.php
index 83987ecd7..ced054d78 100644
--- a/lib/Service/HostedSignalingServerService.php
+++ b/lib/Service/HostedSignalingServerService.php
@@ -38,19 +38,13 @@ use OCP\Security\ISecureRandom;
use Psr\Log\LoggerInterface;
class HostedSignalingServerService {
-
- /** @var IConfig */
- private $config;
+ private IConfig $config;
/** @var mixed */
private $apiServerUrl;
- /** @var IClientService */
- private $clientService;
- /** @var LoggerInterface */
- private $logger;
- /** @var IL10N */
- private $l10n;
- /** @var ISecureRandom */
- private $secureRandom;
+ private IClientService $clientService;
+ private LoggerInterface $logger;
+ private IL10N $l10n;
+ private ISecureRandom $secureRandom;
public function __construct(IConfig $config,
IClientService $clientService,
diff --git a/lib/Service/MembershipService.php b/lib/Service/MembershipService.php
index f1e777111..775f6fbc9 100644
--- a/lib/Service/MembershipService.php
+++ b/lib/Service/MembershipService.php
@@ -35,13 +35,9 @@ use OCP\IUser;
use Psr\Log\LoggerInterface;
class MembershipService {
-
- /** @var IAppManager */
- protected $appManager;
- /** @var IGroupManager */
- protected $groupManager;
- /** @var AttendeeMapper */
- protected $attendeeMapper;
+ protected IAppManager $appManager;
+ protected IGroupManager $groupManager;
+ protected AttendeeMapper $attendeeMapper;
public function __construct(IAppManager $appManager,
IGroupManager $groupManager,
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index a2998890a..b0a829f5c 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -23,6 +23,7 @@ declare(strict_types=1);
namespace OCA\Talk\Service;
+use OCA\Talk\Manager;
use OCA\Circles\CirclesManager;
use OCA\Circles\Model\Circle;
use OCA\Circles\Model\Member;
@@ -71,34 +72,20 @@ use OCP\IUserManager;
use OCP\Security\ISecureRandom;
class ParticipantService {
- /** @var IConfig */
- protected $serverConfig;
- /** @var Config */
- protected $talkConfig;
- /** @var AttendeeMapper */
- protected $attendeeMapper;
- /** @var SessionMapper */
- protected $sessionMapper;
- /** @var SessionService */
- protected $sessionService;
- /** @var ISecureRandom */
- private $secureRandom;
- /** @var IDBConnection */
- protected $connection;
- /** @var IEventDispatcher */
- private $dispatcher;
- /** @var IUserManager */
- private $userManager;
- /** @var IGroupManager */
- private $groupManager;
- /** @var MembershipService */
- private $membershipService;
- /** @var Notifications */
- private $notifications;
- /** @var ITimeFactory */
- private $timeFactory;
- /** @var ICacheFactory */
- private $cacheFactory;
+ protected IConfig $serverConfig;
+ protected Config $talkConfig;
+ protected AttendeeMapper $attendeeMapper;
+ protected SessionMapper $sessionMapper;
+ protected SessionService $sessionService;
+ private ISecureRandom $secureRandom;
+ protected IDBConnection $connection;
+ private IEventDispatcher $dispatcher;
+ private IUserManager $userManager;
+ private IGroupManager $groupManager;
+ private MembershipService $membershipService;
+ private Notifications $notifications;
+ private ITimeFactory $timeFactory;
+ private ICacheFactory $cacheFactory;
public function __construct(IConfig $serverConfig,
Config $talkConfig,
@@ -268,7 +255,7 @@ class ParticipantService {
$attendee = $this->attendeeMapper->findByActor($room->getId(), Attendee::ACTOR_USERS, $user->getUID());
} catch (DoesNotExistException $e) {
// queried here to avoid loop deps
- $manager = \OC::$server->get(\OCA\Talk\Manager::class);
+ $manager = \OC::$server->get(Manager::class);
$isListableByUser = $manager->isRoomListableByUser($room, $user->getUID());
if (!$isListableByUser && !$event->getPassedPasswordProtection() && !$room->verifyPassword($password)['result']) {
diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php
index 5a8c45e1b..b8263d76b 100644
--- a/lib/Service/RoomService.php
+++ b/lib/Service/RoomService.php
@@ -35,15 +35,10 @@ use OCP\IUser;
use OCP\Share\IManager as IShareManager;
class RoomService {
-
- /** @var Manager */
- protected $manager;
- /** @var ParticipantService */
- protected $participantService;
- /** @var IShareManager */
- protected $shareManager;
- /** @var IEventDispatcher */
- private $dispatcher;
+ protected Manager $manager;
+ protected ParticipantService $participantService;
+ protected IShareManager $shareManager;
+ private IEventDispatcher $dispatcher;
public function __construct(Manager $manager,
ParticipantService $participantService,
diff --git a/lib/Service/SessionService.php b/lib/Service/SessionService.php
index 875423326..b96001b28 100644
--- a/lib/Service/SessionService.php
+++ b/lib/Service/SessionService.php
@@ -32,12 +32,9 @@ use OCP\IDBConnection;
use OCP\Security\ISecureRandom;
class SessionService {
- /** @var SessionMapper */
- protected $sessionMapper;
- /** @var IDBConnection */
- protected $connection;
- /** @var ISecureRandom */
- protected $secureRandom;
+ protected SessionMapper $sessionMapper;
+ protected IDBConnection $connection;
+ protected ISecureRandom $secureRandom;
public function __construct(SessionMapper $sessionMapper,
IDBConnection $connection,