Merge pull request #3731 from nextcloud/dependabot/composer/nextcloud/coding-standard-1.3.1
Chore(deps-dev): Bump nextcloud/coding-standard from 1.2.3 to 1.3.1
This commit is contained in:
Коммит
c72f871911
|
@ -585,20 +585,20 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.30.0",
|
||||
"version": "v1.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433"
|
||||
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433",
|
||||
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
|
||||
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -645,7 +645,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0"
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -661,7 +661,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-05-31T15:07:36+00:00"
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
|
@ -1130,6 +1130,52 @@
|
|||
},
|
||||
"time": "2024-01-02T13:46:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kubawerlos/php-cs-fixer-custom-fixers",
|
||||
"version": "v3.22.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git",
|
||||
"reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/8701394f0c7cd450ac4fa577d24589122c1d5d5e",
|
||||
"reference": "8701394f0c7cd450ac4fa577d24589122c1d5d5e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-filter": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.61.1",
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.6.4 || ^10.5.29"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpCsFixerCustomFixers\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kuba Werłos",
|
||||
"email": "werlos@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A set of custom fixers for PHP CS Fixer",
|
||||
"support": {
|
||||
"issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues",
|
||||
"source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.22.0"
|
||||
},
|
||||
"time": "2024-08-16T20:44:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/factory-muffin",
|
||||
"version": "v3.3.0",
|
||||
|
@ -1275,19 +1321,20 @@
|
|||
},
|
||||
{
|
||||
"name": "nextcloud/coding-standard",
|
||||
"version": "v1.2.3",
|
||||
"version": "v1.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nextcloud/coding-standard.git",
|
||||
"reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da"
|
||||
"reference": "e88acb0df6217b808d1632286ddfec9267a102e4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da",
|
||||
"reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da",
|
||||
"url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/e88acb0df6217b808d1632286ddfec9267a102e4",
|
||||
"reference": "e88acb0df6217b808d1632286ddfec9267a102e4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"kubawerlos/php-cs-fixer-custom-fixers": "^3.22",
|
||||
"php": "^7.3|^8.0",
|
||||
"php-cs-fixer/shim": "^3.17"
|
||||
},
|
||||
|
@ -1310,9 +1357,9 @@
|
|||
"description": "Nextcloud coding standards for the php cs fixer",
|
||||
"support": {
|
||||
"issues": "https://github.com/nextcloud/coding-standard/issues",
|
||||
"source": "https://github.com/nextcloud/coding-standard/tree/v1.2.3"
|
||||
"source": "https://github.com/nextcloud/coding-standard/tree/v1.3.1"
|
||||
},
|
||||
"time": "2024-08-23T14:32:32+00:00"
|
||||
"time": "2024-09-19T09:07:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nextcloud/ocp",
|
||||
|
@ -1360,16 +1407,16 @@
|
|||
},
|
||||
{
|
||||
"name": "php-cs-fixer/shim",
|
||||
"version": "v3.62.0",
|
||||
"version": "v3.64.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/shim.git",
|
||||
"reference": "7a91d5ce45c486f5b445d95901228507a02f60ae"
|
||||
"reference": "81ccfd24baf3a10810dab1152c403981a790b837"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae",
|
||||
"reference": "7a91d5ce45c486f5b445d95901228507a02f60ae",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/81ccfd24baf3a10810dab1152c403981a790b837",
|
||||
"reference": "81ccfd24baf3a10810dab1152c403981a790b837",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1406,9 +1453,9 @@
|
|||
"description": "A tool to automatically fix PHP code style",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
|
||||
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0"
|
||||
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.64.0"
|
||||
},
|
||||
"time": "2024-08-07T17:03:46+00:00"
|
||||
"time": "2024-08-30T23:10:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
|
|
|
@ -18,7 +18,7 @@ use OCP\IURLGenerator;
|
|||
class PollChanges implements IFilter {
|
||||
public function __construct(
|
||||
protected IL10N $l10n,
|
||||
protected IURLGenerator $urlGenerator
|
||||
protected IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class Command extends \Symfony\Component\Console\Command\Command {
|
|||
public function __construct(
|
||||
) {
|
||||
parent::__construct();
|
||||
$this->question = new ConfirmationQuestion('Continue (y/n)? ['. ($this->defaultContinueAnswer ? 'y' : 'n') . '] ', $this->defaultContinueAnswer);
|
||||
$this->question = new ConfirmationQuestion('Continue (y/n)? [' . ($this->defaultContinueAnswer ? 'y' : 'n') . '] ', $this->defaultContinueAnswer);
|
||||
}
|
||||
|
||||
protected function configure(): void {
|
||||
|
|
|
@ -29,7 +29,7 @@ class Purge extends Command {
|
|||
|
||||
public function __construct(
|
||||
private IDBConnection $connection,
|
||||
private TableManager $tableManager
|
||||
private TableManager $tableManager,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
|
|||
class TransferOwnership extends Command {
|
||||
public function __construct(
|
||||
private IUserManager $userManager,
|
||||
private PollService $pollService
|
||||
private PollService $pollService,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ trait TShareCommand {
|
|||
private ShareMapper $shareMapper,
|
||||
private ShareService $shareService,
|
||||
private IUserManager $userManager,
|
||||
private IGroupManager $groupManager
|
||||
private IGroupManager $groupManager,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ class BaseApiController extends ApiController {
|
|||
IRequest $request,
|
||||
string $corsMethods = 'PUT, POST, GET, DELETE',
|
||||
string $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
|
||||
int $corsMaxAge = 1728000
|
||||
int $corsMaxAge = 1728000,
|
||||
) {
|
||||
parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class CommentApiController extends BaseApiController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private CommentService $commentService
|
||||
private CommentService $commentService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class CommentController extends BaseController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private CommentService $commentService
|
||||
private CommentService $commentService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class OptionApiController extends BaseApiController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private OptionService $optionService
|
||||
private OptionService $optionService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class PollApiController extends BaseApiController {
|
|||
string $appName,
|
||||
IRequest $request,
|
||||
private Acl $acl,
|
||||
private PollService $pollService
|
||||
private PollService $pollService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class PublicController extends BasePublicController {
|
|||
private SubscriptionService $subscriptionService,
|
||||
private SystemService $systemService,
|
||||
private VoteService $voteService,
|
||||
private WatchService $watchService
|
||||
private WatchService $watchService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class SettingsController extends BaseController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private SettingsService $settingsService
|
||||
private SettingsService $settingsService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ class ShareApiController extends BaseApiController {
|
|||
string $appName,
|
||||
IRequest $request,
|
||||
private MailService $mailService,
|
||||
private ShareService $shareService
|
||||
private ShareService $shareService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ class SubscriptionController extends BaseController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private SubscriptionService $subscriptionService
|
||||
private SubscriptionService $subscriptionService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class SystemController extends BaseController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private SystemService $systemService
|
||||
private SystemService $systemService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class VoteApiController extends BaseApiController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private VoteService $voteService
|
||||
private VoteService $voteService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class WatchController extends BaseController {
|
|||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
private WatchService $watchService
|
||||
private WatchService $watchService,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class PollWidget implements IWidget {
|
|||
*/
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
private IURLGenerator $urlGenerator
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class CommentMapper extends QBMapperWithUser {
|
|||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function renameUserId(string $userId, string $replacementId, int|null $pollId = null): void {
|
||||
public function renameUserId(string $userId, string $replacementId, ?int $pollId = null): void {
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->update($this->getTableName(), self::TABLE)
|
||||
->set('user_id', $query->createNamedParameter($replacementId))
|
||||
|
|
|
@ -257,7 +257,7 @@ class IndexManager {
|
|||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function removeNamedIndexFromTable(string $tableName, string $indexName): string|null {
|
||||
public function removeNamedIndexFromTable(string $tableName, string $indexName): ?string {
|
||||
$tableName = $this->dbPrefix . $tableName;
|
||||
$message = null;
|
||||
try {
|
||||
|
|
|
@ -128,7 +128,7 @@ class OptionMapper extends QBMapperWithUser {
|
|||
return $this->findEntities($qb);
|
||||
}
|
||||
|
||||
public function renameUserId(string $userId, string $replacementName, int|null $pollId = null): void {
|
||||
public function renameUserId(string $userId, string $replacementName, ?int $pollId = null): void {
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->update($this->getTableName())
|
||||
->set('owner', $query->createNamedParameter($replacementName))
|
||||
|
|
|
@ -211,7 +211,7 @@ class PollMapper extends QBMapper {
|
|||
$qb->selectAlias($joinAlias . '.locked', 'is_current_user_locked')
|
||||
->addGroupBy($joinAlias . '.locked');
|
||||
|
||||
$qb->addSelect($qb->createFunction('coalesce(' . $joinAlias . '.token, '. $emptyString . ') AS share_token'))
|
||||
$qb->addSelect($qb->createFunction('coalesce(' . $joinAlias . '.token, ' . $emptyString . ') AS share_token'))
|
||||
->addGroupBy($joinAlias . '.token');
|
||||
|
||||
$qb->leftJoin(
|
||||
|
@ -234,19 +234,19 @@ class PollMapper extends QBMapper {
|
|||
$joinAlias = 'group_shares';
|
||||
|
||||
if ($this->db->getDatabasePlatform() instanceof PostgreSQLPlatform) {
|
||||
$qb->addSelect($qb->createFunction('string_agg(distinct ' . $joinAlias . '.user_id, \''. self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
$qb->addSelect($qb->createFunction('string_agg(distinct ' . $joinAlias . '.user_id, \'' . self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
|
||||
} elseif ($this->db->getDatabasePlatform() instanceof OraclePlatform) {
|
||||
$qb->addSelect($qb->createFunction('listagg(distinct ' . $joinAlias . '.user_id, \''. self::CONCAT_SEPARATOR . '\') WITHIN GROUP (ORDER BY ' . $joinAlias . '.user_id) AS group_shares'));
|
||||
$qb->addSelect($qb->createFunction('listagg(distinct ' . $joinAlias . '.user_id, \'' . self::CONCAT_SEPARATOR . '\') WITHIN GROUP (ORDER BY ' . $joinAlias . '.user_id) AS group_shares'));
|
||||
|
||||
} elseif ($this->db->getDatabasePlatform() instanceof SqlitePlatform) {
|
||||
$qb->addSelect($qb->createFunction('group_concat(replace(distinct ' . $joinAlias . '.user_id ,\'\',\'\'), \''. self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
$qb->addSelect($qb->createFunction('group_concat(replace(distinct ' . $joinAlias . '.user_id ,\'\',\'\'), \'' . self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
|
||||
} elseif ($this->db->getDatabasePlatform() instanceof MySQLPlatform) {
|
||||
$qb->addSelect($qb->createFunction('group_concat(distinct ' . $joinAlias . '.user_id SEPARATOR \''. self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
$qb->addSelect($qb->createFunction('group_concat(distinct ' . $joinAlias . '.user_id SEPARATOR \'' . self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
|
||||
} else {
|
||||
$qb->addSelect($qb->createFunction('group_concat(distinct ' . $joinAlias . '.user_id SEPARATOR \''. self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
$qb->addSelect($qb->createFunction('group_concat(distinct ' . $joinAlias . '.user_id SEPARATOR \'' . self::CONCAT_SEPARATOR . '\') AS group_shares'));
|
||||
}
|
||||
|
||||
$qb->leftJoin(
|
||||
|
@ -274,7 +274,7 @@ class PollMapper extends QBMapper {
|
|||
$zero = $qb->createNamedParameter(0, IQueryBuilder::PARAM_INT);
|
||||
$saveMin = $qb->createNamedParameter(time(), IQueryBuilder::PARAM_INT);
|
||||
|
||||
$qb->addSelect($qb->createFunction('coalesce(MAX(' . $joinAlias . '.timestamp), '. $zero . ') AS max_date'))
|
||||
$qb->addSelect($qb->createFunction('coalesce(MAX(' . $joinAlias . '.timestamp), ' . $zero . ') AS max_date'))
|
||||
->addSelect($qb->createFunction('coalesce(MIN(' . $joinAlias . '.timestamp), ' . $saveMin . ') AS min_date'));
|
||||
$qb->selectAlias($qb->func()->count($joinAlias . '.id'), 'count_options');
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ abstract class QBMapperWithUser extends QBMapper {
|
|||
public function __construct(
|
||||
IDBConnection $db,
|
||||
string $tableName,
|
||||
?string $entityClass = null
|
||||
?string $entityClass = null,
|
||||
) {
|
||||
parent::__construct($db, $tableName, $entityClass);
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class TableManager {
|
|||
->setParameter('appid', AppConstants::APP_ID)
|
||||
->executeStatement();
|
||||
|
||||
$this->logger->info('Removed all app config records from '. $this->dbPrefix . 'appconfig');
|
||||
$this->logger->info('Removed all app config records from ' . $this->dbPrefix . 'appconfig');
|
||||
$messages[] = 'Removed all app config records from ' . $this->dbPrefix . 'appconfig';
|
||||
$messages[] = 'Done.';
|
||||
$messages[] = '';
|
||||
|
@ -273,7 +273,7 @@ class TableManager {
|
|||
$count = $this->deleteDuplicates($tableName, $index['columns']);
|
||||
|
||||
if ($count) {
|
||||
$messages[] = 'Removed '. $count. ' duplicate records from ' . $this->dbPrefix . $tableName;
|
||||
$messages[] = 'Removed ' . $count . ' duplicate records from ' . $this->dbPrefix . $tableName;
|
||||
$this->logger->info(end($messages));
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class VoteMapper extends QBMapperWithUser {
|
|||
$qb->executeStatement();
|
||||
}
|
||||
|
||||
public function renameUserId(string $userId, string $replacementId, int|null $pollId = null): void {
|
||||
public function renameUserId(string $userId, string $replacementId, ?int $pollId = null): void {
|
||||
$query = $this->db->getQueryBuilder();
|
||||
$query->update($this->getTableName())
|
||||
->set('user_id', $query->createNamedParameter($replacementId))
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Comment;
|
|||
|
||||
class CommentAddEvent extends CommentEvent {
|
||||
public function __construct(
|
||||
protected Comment $comment
|
||||
protected Comment $comment,
|
||||
) {
|
||||
parent::__construct($comment);
|
||||
$this->eventId = self::ADD;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Comment;
|
|||
|
||||
class CommentDeleteEvent extends CommentEvent {
|
||||
public function __construct(
|
||||
protected Comment $comment
|
||||
protected Comment $comment,
|
||||
) {
|
||||
parent::__construct($comment);
|
||||
$this->log = false;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Option;
|
|||
|
||||
class OptionConfirmedEvent extends OptionEvent {
|
||||
public function __construct(
|
||||
protected Option $option
|
||||
protected Option $option,
|
||||
) {
|
||||
parent::__construct($option);
|
||||
$this->eventId = self::CONFIRM;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Option;
|
|||
|
||||
class OptionDeletedEvent extends OptionEvent {
|
||||
public function __construct(
|
||||
protected Option $option
|
||||
protected Option $option,
|
||||
) {
|
||||
parent::__construct($option);
|
||||
$this->eventId = $option->getDeleted() ? self::DELETE : self::RESTORE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Option;
|
|||
|
||||
class OptionUnconfirmedEvent extends OptionEvent {
|
||||
public function __construct(
|
||||
protected Option $option
|
||||
protected Option $option,
|
||||
) {
|
||||
parent::__construct($option);
|
||||
$this->eventId = self::UNCONFIRM;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Option;
|
|||
|
||||
class OptionUpdatedEvent extends OptionEvent {
|
||||
public function __construct(
|
||||
protected Option $option
|
||||
protected Option $option,
|
||||
) {
|
||||
parent::__construct($option);
|
||||
$this->eventId = self::UPDATE;
|
||||
|
|
|
@ -11,7 +11,7 @@ use OCA\Polls\Notification\Notifier;
|
|||
|
||||
class PollArchivedEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::DELETE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Poll;
|
|||
|
||||
class PollCreatedEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::ADD;
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCA\Polls\Notification\Notifier;
|
|||
|
||||
class PollDeletedEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::DELETE;
|
||||
|
|
|
@ -20,7 +20,7 @@ abstract class PollEvent extends BaseEvent {
|
|||
public const OPTION_REORDER = 'poll_option_reorder';
|
||||
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->activityObjectType = 'poll';
|
||||
|
|
|
@ -13,7 +13,7 @@ class PollExpiredEvent extends PollEvent {
|
|||
* @psalm-suppress PossiblyUnusedMethod
|
||||
*/
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::EXPIRE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Poll;
|
|||
|
||||
class PollOptionReorderedEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->log = false;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Poll;
|
|||
|
||||
class PollOwnerChangeEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::OWNER_CHANGE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Poll;
|
|||
|
||||
class PollRestoredEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::RESTORE;
|
||||
|
|
|
@ -11,7 +11,7 @@ use OCA\Polls\Notification\Notifier;
|
|||
|
||||
class PollTakeoverEvent extends PollOwnerChangeEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Poll;
|
|||
|
||||
class PollUpdatedEvent extends PollEvent {
|
||||
public function __construct(
|
||||
protected Poll $poll
|
||||
protected Poll $poll,
|
||||
) {
|
||||
parent::__construct($poll);
|
||||
$this->eventId = self::UPDATE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareChangedDisplayNameEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::CHANGE_DISPLAY_NAME;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareChangedEmailEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::CHANGE_EMAIL;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareChangedLabelEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::CHANGE_LABEL;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareChangedRegistrationConstraintEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::CHANGE_REG_CONSTR;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareCreateEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::ADD;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareDeletedEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = $share->getDeleted() ? self::DELETE : self::RESTORE;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareLockedEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = $share->getLocked() ? self::UNLOCKED : self::LOCKED;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareRegistrationEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::REGISTRATION;
|
||||
|
|
|
@ -10,7 +10,7 @@ use OCA\Polls\Db\Share;
|
|||
|
||||
class ShareTypeChangedEvent extends ShareEvent {
|
||||
public function __construct(
|
||||
protected Share $share
|
||||
protected Share $share,
|
||||
) {
|
||||
parent::__construct($share);
|
||||
$this->eventId = self::CHANGE_TYPE;
|
||||
|
|
|
@ -15,7 +15,7 @@ abstract class VoteEvent extends BaseEvent {
|
|||
public const SET = 'vote_set';
|
||||
|
||||
public function __construct(
|
||||
protected Vote $vote
|
||||
protected Vote $vote,
|
||||
) {
|
||||
parent::__construct($vote);
|
||||
$this->activityObjectType = 'poll';
|
||||
|
|
|
@ -11,7 +11,7 @@ use OCA\Polls\Db\Vote;
|
|||
class VoteSetEvent extends VoteEvent {
|
||||
public function __construct(
|
||||
protected Vote $vote,
|
||||
protected bool $log = true
|
||||
protected bool $log = true,
|
||||
) {
|
||||
parent::__construct($vote);
|
||||
$this->log = $log;
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class CirclesNotEnabledException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Circles is not enabled for this user'
|
||||
string $e = 'Circles is not enabled for this user',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class ContactsNotEnabledExceptions extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Contacts is not enabled'
|
||||
string $e = 'Contacts is not enabled',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class DuplicateEntryException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Duplicate Entry'
|
||||
string $e = 'Duplicate Entry',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class EmptyTitleException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Poll title must not be empty'
|
||||
string $e = 'Poll title must not be empty',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ use OCP\AppFramework\Http;
|
|||
class Exception extends \Exception {
|
||||
public function __construct(
|
||||
string $e = 'Unexpected error',
|
||||
protected int $status = Http::STATUS_INTERNAL_SERVER_ERROR
|
||||
protected int $status = Http::STATUS_INTERNAL_SERVER_ERROR,
|
||||
) {
|
||||
parent::__construct($e);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class ForbiddenException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Forbidden'
|
||||
string $e = 'Forbidden',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InsufficientAttributesException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Attribut constraints not met'
|
||||
string $e = 'Attribut constraints not met',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidAccessException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid access value'
|
||||
string $e = 'Invalid access value',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidClassException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid class value'
|
||||
string $e = 'Invalid class value',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidEmailAddress extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid email address'
|
||||
string $e = 'Invalid email address',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidPollTypeException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid pollType value'
|
||||
string $e = 'Invalid pollType value',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidShareTypeException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid share type'
|
||||
string $e = 'Invalid share type',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidShowResultsException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Invalid showResults value'
|
||||
string $e = 'Invalid showResults value',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class InvalidUsernameException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Username not allowed'
|
||||
string $e = 'Username not allowed',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class NoDeadLineException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'No deadline calculated'
|
||||
string $e = 'No deadline calculated',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_OK);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class NoEmailAddress extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'No email address found'
|
||||
string $e = 'No email address found',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class NoUpdatesException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'No updates'
|
||||
string $e = 'No updates',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_NOT_MODIFIED);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class NotAuthorizedException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Unauthorized or not found'
|
||||
string $e = 'Unauthorized or not found',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_UNAUTHORIZED);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class NotFoundException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Not found'
|
||||
string $e = 'Not found',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class OCPEventException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'OCP namespace event'
|
||||
string $e = 'OCP namespace event',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_OK);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace OCA\Polls\Exceptions;
|
|||
|
||||
class ShareNotFoundException extends NotFoundException {
|
||||
public function __construct(
|
||||
string $e = 'Share not found'
|
||||
string $e = 'Share not found',
|
||||
) {
|
||||
parent::__construct($e);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class TooShortException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'String too short'
|
||||
string $e = 'String too short',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_FORBIDDEN);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace OCA\Polls\Exceptions;
|
|||
|
||||
class UserNotFoundException extends NotFoundException {
|
||||
public function __construct(
|
||||
string $e = 'User not found'
|
||||
string $e = 'User not found',
|
||||
) {
|
||||
parent::__construct($e);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use OCP\AppFramework\Http;
|
|||
|
||||
class VoteLimitExceededException extends Exception {
|
||||
public function __construct(
|
||||
string $e = 'Vote limit exceeded'
|
||||
string $e = 'Vote limit exceeded',
|
||||
) {
|
||||
parent::__construct($e, Http::STATUS_CONFLICT);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class ActivityFilter implements \OCP\Activity\IFilter {
|
|||
|
||||
public function __construct(
|
||||
IL10N $l10n,
|
||||
IURLGenerator $urlGenerator
|
||||
IURLGenerator $urlGenerator,
|
||||
) {
|
||||
$this->l10n = $l10n;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
|
|
|
@ -31,7 +31,7 @@ class CalendarEvent implements \JsonSerializable {
|
|||
protected ICalendar $calendar,
|
||||
protected ?DateTimeImmutable $filterFrom = null,
|
||||
protected ?DateTimeImmutable $filterTo = null,
|
||||
protected ?DateTimeZone $timezone = null
|
||||
protected ?DateTimeZone $timezone = null,
|
||||
) {
|
||||
$this->event = $this->iCal['objects'][0];
|
||||
$this->hasRRule = isset($this->event['RRULE']);
|
||||
|
|
|
@ -27,7 +27,7 @@ class Circle extends UserBase {
|
|||
private CirclesCircle $circle;
|
||||
|
||||
public function __construct(
|
||||
string $id
|
||||
string $id,
|
||||
) {
|
||||
parent::__construct($id, self::TYPE);
|
||||
$this->icon = self::ICON;
|
||||
|
|
|
@ -19,7 +19,7 @@ class ContactGroup extends UserBase {
|
|||
public const ICON = 'icon-group';
|
||||
|
||||
public function __construct(
|
||||
string $id
|
||||
string $id,
|
||||
) {
|
||||
parent::__construct($id, self::TYPE);
|
||||
$this->icon = self::ICON;
|
||||
|
|
|
@ -21,7 +21,7 @@ class Group extends UserBase {
|
|||
private IGroup $group;
|
||||
|
||||
public function __construct(
|
||||
string $id
|
||||
string $id,
|
||||
) {
|
||||
parent::__construct($id, self::TYPE);
|
||||
$this->icon = self::ICON;
|
||||
|
|
|
@ -21,7 +21,7 @@ class ConfirmationMail extends MailBase {
|
|||
|
||||
public function __construct(
|
||||
string $recipientId,
|
||||
int $pollId
|
||||
int $pollId,
|
||||
) {
|
||||
parent::__construct($recipientId, $pollId);
|
||||
$this->confirmedOptions = $this->optionMapper->findConfirmed($pollId);
|
||||
|
|
|
@ -46,7 +46,7 @@ abstract class MailBase {
|
|||
public function __construct(
|
||||
protected string $recipientId,
|
||||
protected int $pollId,
|
||||
protected string $url = ''
|
||||
protected string $url = '',
|
||||
) {
|
||||
$this->setup();
|
||||
}
|
||||
|
@ -157,14 +157,14 @@ abstract class MailBase {
|
|||
$legal = '';
|
||||
|
||||
if ($this->appSettings->getUseImprintUrl()) {
|
||||
$legal = '<a href="' . $this->appSettings->getUseImprintUrl() . '">' . $this->l10n->t('Legal Notice') . '</a>';
|
||||
$legal = '<a href="' . $this->appSettings->getUseImprintUrl() . '">' . $this->l10n->t('Legal Notice') . '</a>';
|
||||
}
|
||||
if ($this->appSettings->getUsePrivacyUrl()) {
|
||||
if ($this->appSettings->getUseImprintUrl()) {
|
||||
$legal = $legal . ' | ';
|
||||
}
|
||||
|
||||
$legal = $legal . '<a href="' . $this->appSettings->getUsePrivacyUrl() . '">' . $this->l10n->t('Privacy Policy') . '</a>';
|
||||
$legal = $legal . '<a href="' . $this->appSettings->getUsePrivacyUrl() . '">' . $this->l10n->t('Privacy Policy') . '</a>';
|
||||
}
|
||||
return $legal;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class NotificationMail extends MailBase {
|
|||
protected const TEMPLATE_CLASS = AppConstants::APP_ID . '.Notification';
|
||||
|
||||
public function __construct(
|
||||
protected Subscription $subscription
|
||||
protected Subscription $subscription,
|
||||
) {
|
||||
parent::__construct($subscription->getUserId(), $subscription->getPollId());
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ class ReminderMail extends MailBase {
|
|||
|
||||
public function __construct(
|
||||
protected string $recipientId,
|
||||
protected int $pollId
|
||||
protected int $pollId,
|
||||
) {
|
||||
parent::__construct($recipientId, $pollId);
|
||||
$this->deadline = $this->poll->getDeadline();
|
||||
|
|
|
@ -49,7 +49,6 @@ class AppSettings implements JsonSerializable {
|
|||
public function __construct(
|
||||
private IConfig $config,
|
||||
private UserSession $userSession,
|
||||
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class Email extends UserBase {
|
|||
string $id,
|
||||
string $displayName = '',
|
||||
string $emailAddress = '',
|
||||
string $languageCode = ''
|
||||
string $languageCode = '',
|
||||
) {
|
||||
parent::__construct($id, self::TYPE, languageCode: $languageCode);
|
||||
$this->icon = self::ICON;
|
||||
|
|
|
@ -23,7 +23,7 @@ class GenericUser extends UserBase {
|
|||
string $emailAddress = '',
|
||||
string $languageCode = '',
|
||||
string $localeCode = '',
|
||||
string $timeZoneName = ''
|
||||
string $timeZoneName = '',
|
||||
) {
|
||||
parent::__construct($id, $type, $displayName, $emailAddress, $languageCode, $localeCode, $timeZoneName);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class User extends UserBase {
|
|||
|
||||
public function __construct(
|
||||
string $id,
|
||||
string $type = self::TYPE
|
||||
string $type = self::TYPE,
|
||||
) {
|
||||
parent::__construct($id, $type);
|
||||
$this->icon = self::ICON;
|
||||
|
|
|
@ -174,7 +174,7 @@ class MailService {
|
|||
}
|
||||
}
|
||||
|
||||
public function sendInvitation(Share $share, ?SentResult &$sentResult = null): SentResult|null {
|
||||
public function sendInvitation(Share $share, ?SentResult &$sentResult = null): ?SentResult {
|
||||
foreach ($this->userMapper->getUserFromShare($share)->getMembers() as $recipient) {
|
||||
$invitation = new InvitationMail($recipient->getId(), $share);
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ class SettingsService {
|
|||
/**
|
||||
* @psalm-suppress PossiblyUnusedMethod
|
||||
*/
|
||||
public function __construct(private AppSettings $appSettings) {
|
||||
public function __construct(
|
||||
private AppSettings $appSettings,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -297,11 +297,11 @@ class ShareService {
|
|||
* @param string|null $language
|
||||
*/
|
||||
private function convertPersonalPublicShareToExternalShare(
|
||||
string|null $userId = null,
|
||||
string|null $displayName = null,
|
||||
string|null $emailAddress = null,
|
||||
string|null $timeZone = null,
|
||||
string|null $language = null,
|
||||
?string $userId = null,
|
||||
?string $displayName = null,
|
||||
?string $emailAddress = null,
|
||||
?string $timeZone = null,
|
||||
?string $language = null,
|
||||
): void {
|
||||
|
||||
// paranoia double check
|
||||
|
@ -361,7 +361,7 @@ class ShareService {
|
|||
string $publicShareToken,
|
||||
string $displayName,
|
||||
string $emailAddress = '',
|
||||
string $timeZone = ''
|
||||
string $timeZone = '',
|
||||
): Share {
|
||||
$this->share = $this->get($publicShareToken);
|
||||
$displayName = $this->systemService->validatePublicUsername($displayName, share: $this->share);
|
||||
|
@ -454,7 +454,7 @@ class ShareService {
|
|||
return $share;
|
||||
}
|
||||
|
||||
public function sendAllInvitations(int $pollId): SentResult|null {
|
||||
public function sendAllInvitations(int $pollId): ?SentResult {
|
||||
$sentResult = new SentResult();
|
||||
|
||||
// first resolve group shares
|
||||
|
@ -514,7 +514,7 @@ class ShareService {
|
|||
* @param Share $share
|
||||
* @param SentResult $sentResult to collect results
|
||||
*/
|
||||
public function sendInvitation(Share $share, ?SentResult &$sentResult = null): SentResult|null {
|
||||
public function sendInvitation(Share $share, ?SentResult &$sentResult = null): ?SentResult {
|
||||
if (in_array($share->getType(), [Share::TYPE_USER, Share::TYPE_ADMIN], true)) {
|
||||
$this->notificationService->sendInvitation($share->getPollId(), $share->getUserId());
|
||||
} elseif ($share->getType() === Share::TYPE_GROUP) {
|
||||
|
@ -557,7 +557,7 @@ class ShareService {
|
|||
string $type,
|
||||
string $userId = '',
|
||||
string $displayName = '',
|
||||
string $emailAddress = ''
|
||||
string $emailAddress = '',
|
||||
): Share {
|
||||
$this->pollMapper->find($pollId)->request(Poll::PERMISSION_POLL_EDIT);
|
||||
|
||||
|
@ -634,7 +634,7 @@ class ShareService {
|
|||
int $pollId,
|
||||
UserBase $userGroup,
|
||||
bool $preventInvitation = false,
|
||||
string $timeZone = ''
|
||||
string $timeZone = '',
|
||||
): Share {
|
||||
$preventInvitation = $userGroup->getType() === UserBase::TYPE_PUBLIC ?: $preventInvitation;
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ class ActivitySettings implements ISetting {
|
|||
/**
|
||||
* @psalm-suppress PossiblyUnusedMethod
|
||||
*/
|
||||
public function __construct(protected IL10N $l10n) {
|
||||
public function __construct(
|
||||
protected IL10N $l10n,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getIdentifier() : string {
|
||||
|
|
|
@ -17,7 +17,10 @@ use OCP\Settings\IIconSection;
|
|||
* @psalm-suppress UnusedClass
|
||||
*/
|
||||
class AdminSection implements IIconSection {
|
||||
public function __construct(private IL10N $l10n, private IURLGenerator $urlGenerator) {
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getID(): string {
|
||||
|
|
|
@ -17,7 +17,10 @@ use OCP\Settings\IIconSection;
|
|||
* @psalm-suppress UnusedClass
|
||||
*/
|
||||
class PersonalSection implements IIconSection {
|
||||
public function __construct(private IL10N $l10n, private IURLGenerator $urlGenerator) {
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getID(): string {
|
||||
|
|
|
@ -43,7 +43,6 @@ class UserSession {
|
|||
protected UserMapper $userMapper,
|
||||
protected ShareMapper $shareMapper,
|
||||
protected Share $share,
|
||||
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче