Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use OCA\Mail\Service\Quota;
use ReturnTypeWillChange;

class Account implements JsonSerializable {
final class Account implements JsonSerializable {
public function __construct(
private MailAccount $account,
) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @psalm-immutable
*/
class Address implements JsonSerializable {
final class Address implements JsonSerializable {
public const TYPE_FROM = 0;
public const TYPE_TO = 1;
public const TYPE_CC = 2;
Expand Down
2 changes: 1 addition & 1 deletion lib/AddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @psalm-immutable
*/
class AddressList implements Countable, JsonSerializable {
final class AddressList implements Countable, JsonSerializable {
/** @var Address[] */
private $addresses;

Expand Down
2 changes: 1 addition & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

include_once __DIR__ . '/../../vendor/autoload.php';

class Application extends App implements IBootstrap {
final class Application extends App implements IBootstrap {
public const APP_ID = 'mail';

public function __construct(array $urlParams = []) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use Horde_Mime_Part;

class Attachment {
final class Attachment {
private ?string $id;
private ?string $name;
private string $type;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/CleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use OCP\BackgroundJob\TimedJob;
use Psr\Log\LoggerInterface;

class CleanupJob extends TimedJob {
final class CleanupJob extends TimedJob {
private CleanupService $cleanupService;
private LoggerInterface $logger;

Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/DeleteDuplicatedUidsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\QueuedJob;

class DeleteDuplicatedUidsJob extends QueuedJob {
final class DeleteDuplicatedUidsJob extends QueuedJob {
public function __construct(
ITimeFactory $time,
private MessageMapper $messageMapper,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/DraftsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class DraftsJob extends TimedJob {
final class DraftsJob extends TimedJob {
private DraftsService $draftsService;

public function __construct(ITimeFactory $time,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/FollowUpClassifierJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use OCP\DB\Exception;
use Psr\Log\LoggerInterface;

class FollowUpClassifierJob extends QueuedJob {
final class FollowUpClassifierJob extends QueuedJob {

public const PARAM_MESSAGE_ID = 'messageId';
public const PARAM_MAILBOX_ID = 'mailboxId';
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/IMipMessageJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class IMipMessageJob extends TimedJob {
final class IMipMessageJob extends TimedJob {
private IMipService $iMipService;

public function __construct(ITimeFactory $time,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/MigrateImportantJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use OCP\BackgroundJob\QueuedJob;
use Psr\Log\LoggerInterface;

class MigrateImportantJob extends QueuedJob {
final class MigrateImportantJob extends QueuedJob {
private MailboxMapper $mailboxMapper;
private MailAccountMapper $mailAccountMapper;
private MailManager $mailManager;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/OutboxWorkerJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class OutboxWorkerJob extends TimedJob {
final class OutboxWorkerJob extends TimedJob {
private OutboxService $outboxService;

public function __construct(ITimeFactory $time,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/PreviewEnhancementProcessingJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Psr\Log\LoggerInterface;
use function sprintf;

class PreviewEnhancementProcessingJob extends TimedJob {
final class PreviewEnhancementProcessingJob extends TimedJob {
private IUserManager $userManager;
private AccountService $accountService;
private LoggerInterface $logger;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/QuotaJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Psr\Log\LoggerInterface;
use function sprintf;

class QuotaJob extends TimedJob {
final class QuotaJob extends TimedJob {
private IUserManager $userManager;
private AccountService $accountService;
private IMailManager $mailManager;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/RepairSyncJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use OCP\IUserManager;
use Psr\Log\LoggerInterface;

class RepairSyncJob extends TimedJob {
final class RepairSyncJob extends TimedJob {
public function __construct(
ITimeFactory $time,
private SyncService $syncService,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/SyncJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use function max;
use function sprintf;

class SyncJob extends TimedJob {
final class SyncJob extends TimedJob {
private IUserManager $userManager;
private AccountService $accountService;
private ImapToDbSynchronizer $syncService;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/TrainImportanceClassifierJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Psr\Log\LoggerInterface;
use Throwable;

class TrainImportanceClassifierJob extends TimedJob {
final class TrainImportanceClassifierJob extends TimedJob {
private AccountService $accountService;
private ImportanceClassifier $classifier;
private IJobList $jobList;
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/TrashRetentionJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use OCP\BackgroundJob\TimedJob;
use Psr\Log\LoggerInterface;

class TrashRetentionJob extends TimedJob {
final class TrashRetentionJob extends TimedJob {
public function __construct(
ITimeFactory $time,
private LoggerInterface $logger,
Expand Down
2 changes: 1 addition & 1 deletion lib/BackgroundJob/WakeJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;

class WakeJob extends TimedJob {
final class WakeJob extends TimedJob {
public function __construct(
ITimeFactory $time,
private SnoozeService $snoozeService,
Expand Down
2 changes: 1 addition & 1 deletion lib/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* This class passes the minimum amount of data from the db cache to Horde to make QRESYNC work
* reliably.
*/
class Cache extends Horde_Imap_Client_Cache_Backend {
final class Cache extends Horde_Imap_Client_Cache_Backend {
/** @var CachedMailbox[] */
private array $cachedMailboxes = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/Cache/CachedMailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\Mail\Cache;

class CachedMailbox {
final class CachedMailbox {
/** @var int[]|null */
private ?array $uids = null;

Expand Down
2 changes: 1 addition & 1 deletion lib/Cache/HordeCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use OCA\Mail\Db\MailboxMapper;
use OCA\Mail\Db\MessageMapper;

class HordeCacheFactory {
final class HordeCacheFactory {
public function __construct(
private MailboxMapper $mailboxMapper,
private MessageMapper $messageMapper,
Expand Down
2 changes: 1 addition & 1 deletion lib/Cache/HordeSyncToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\Mail\Cache;

class HordeSyncToken {
final class HordeSyncToken {
public function __construct(
private ?int $nextUid,
private ?int $uidValidity,
Expand Down
2 changes: 1 addition & 1 deletion lib/Cache/HordeSyncTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\Mail\Cache;

class HordeSyncTokenParser {
final class HordeSyncTokenParser {
public function parseSyncToken(string $token): HordeSyncToken {
$decodedToken = base64_decode($token, true);
$parts = explode(',', $decodedToken);
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/AddMissingTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class AddMissingTags extends Command {
final class AddMissingTags extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';

private LoggerInterface $logger;
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/CleanUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CleanUp extends Command {
final class CleanUp extends Command {
private CleanupService $cleanupService;
private LoggerInterface $logger;

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/CreateAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CreateAccount extends Command {
final class CreateAccount extends Command {
public const ARGUMENT_USER_ID = 'user-id';
public const ARGUMENT_NAME = 'name';
public const ARGUMENT_EMAIL = 'email';
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/CreateTagMigrationJobEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CreateTagMigrationJobEntry extends Command {
final class CreateTagMigrationJobEntry extends Command {
private JobList $jobList;
private MailboxMapper $mailboxMapper;

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/DebugAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class DebugAccount extends Command {
final class DebugAccount extends Command {
protected const ARGUMENT_ACCOUNT_ID = 'account-id';
protected const OPTION_DEBUG_ON = 'on';
protected const OPTION_DEBUG_OFF = 'off';
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/DeleteAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class DeleteAccount extends Command {
final class DeleteAccount extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';

private AccountService $accountService;
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/DiagnoseAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use function json_decode;
use function sort;

class DiagnoseAccount extends Command {
final class DiagnoseAccount extends Command {
private const ARGUMENT_ACCOUNT_ID = 'account-id';

private AccountService $accountService;
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/ExportAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class ExportAccount extends Command {
final class ExportAccount extends Command {
public const ARGUMENT_USER_ID = 'user-id';
public const ARGUMENT_OUTPUT_FORMAT = 'output';

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/ExportAccountThreads.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use function json_encode;

class ExportAccountThreads extends Command {
final class ExportAccountThreads extends Command {
private const ARGUMENT_ACCOUNT_ID = 'account-id';
private const OPTION_REDACT = 'redact';

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/PredictImportance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use function memory_get_peak_usage;

class PredictImportance extends Command {
final class PredictImportance extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';
public const ARGUMENT_SENDER = 'sender';
public const ARGUMENT_SUBJECT = 'subject';
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/RunMetaEstimator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class RunMetaEstimator extends Command {
final class RunMetaEstimator extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';
public const ARGUMENT_SHUFFLE = 'shuffle';

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/SyncAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use function memory_get_peak_usage;
use function memory_get_usage;

class SyncAccount extends Command {
final class SyncAccount extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';
public const OPTION_FORCE = 'force';

Expand Down
2 changes: 1 addition & 1 deletion lib/Command/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use function json_decode;
use function memory_get_peak_usage;

class Thread extends Command {
final class Thread extends Command {
public const ARGUMENT_INPUT_FILE = 'thread-file';

private ThreadBuilder $builder;
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/TrainAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Symfony\Component\Console\Output\OutputInterface;
use function memory_get_peak_usage;

class TrainAccount extends Command {
final class TrainAccount extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';
public const ARGUMENT_SHUFFLE = 'shuffle';
public const ARGUMENT_DRY_RUN = 'dry-run';
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/UpdateAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class UpdateAccount extends Command {
final class UpdateAccount extends Command {
public const ARGUMENT_ACCOUNT_ID = 'account-id';
public const ARGUMENT_NAME = 'name';
public const ARGUMENT_EMAIL = 'email';
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/UpdateSystemAutoresponders.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class UpdateSystemAutoresponders extends Command {
final class UpdateSystemAutoresponders extends Command {
public function __construct(
private MailAccountMapper $mailAccountMapper,
private IUserManager $userManager,
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/AccountApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* @psalm-import-type MailAccountListResponse from ResponseDefinitions
*/
class AccountApiController extends OCSController {
final class AccountApiController extends OCSController {
public function __construct(
string $appName,
IRequest $request,
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/AccountsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
use OCP\Security\IRemoteHostValidator;
use Psr\Log\LoggerInterface;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
final #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]

Check failure on line 40 in lib/Controller/AccountsController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

ParseError

lib/Controller/AccountsController.php:40:7: ParseError: Syntax error, unexpected T_ATTRIBUTE, expecting T_ABSTRACT or T_FINAL or T_READONLY or T_CLASS on line 40 (see https://psalm.dev/173)
class AccountsController extends Controller {
private AccountService $accountService;
private string $currentUserId;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/AliasesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
final #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]

Check failure on line 22 in lib/Controller/AliasesController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

ParseError

lib/Controller/AliasesController.php:22:7: ParseError: Syntax error, unexpected T_ATTRIBUTE, expecting T_ABSTRACT or T_FINAL or T_READONLY or T_CLASS on line 22 (see https://psalm.dev/173)
class AliasesController extends Controller {
private AliasesService $aliasService;
private string $currentUserId;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/AutoCompleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
final #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]

Check failure on line 20 in lib/Controller/AutoCompleteController.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

ParseError

lib/Controller/AutoCompleteController.php:20:7: ParseError: Syntax error, unexpected T_ATTRIBUTE, expecting T_ABSTRACT or T_FINAL or T_READONLY or T_CLASS on line 20 (see https://psalm.dev/173)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

class AutoCompleteController extends Controller {
private AutoCompleteService $service;
private ?string $userId;
Expand Down
Loading
Loading