Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apps/admin_audit/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace OCA\AdminAudit\AppInfo;

use OCA\AdminAudit\Actions\Auth;
use OCA\AdminAudit\Actions\Console;
use OCA\AdminAudit\Actions\Files;
use OCA\AdminAudit\Actions\Sharing;
use OCA\AdminAudit\Actions\Trashbin;
Expand Down
1 change: 0 additions & 1 deletion apps/dav/lib/CalDAV/CalendarImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Sabre\VObject\Component\VTimeZone;
use Sabre\VObject\ITip\Message;
use Sabre\VObject\ParseException;
use Sabre\VObject\Property;
use Sabre\VObject\Reader;
use function Sabre\Uri\split as uriSplit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@

namespace OCA\DAV\CalDAV\Federation;

use OCP\GlobalScale\IConfig;
use OCP\IAppConfig;

class CalendarFederationConfig {
public function __construct(
private readonly IAppConfig $appConfig,
private \OCP\GlobalScale\IConfig $gsConfig,
private IConfig $gsConfig,
) {
}

Expand Down
1 change: 0 additions & 1 deletion apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
namespace OCA\DAV\Connector\Sabre;

use Icewind\Streams\CallbackWrapper;
use OC\AppFramework\Http\Request;
use OC\Files\Filesystem;
use OC\Files\Stream\HashWrapper;
use OC\Files\View;
Expand Down
3 changes: 2 additions & 1 deletion apps/dav/lib/Listener/CalendarDelegateActionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use OCP\Calendar\Events\CalendarObjectUpdatedEvent;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IUserSession;
Expand Down Expand Up @@ -210,7 +211,7 @@ private function sendNotification(
/**
* @return array{0: string, 1: string} [subject, heading]
*/
private function subjectAndHeading(\OCP\IL10N $l, string $action, string $actorName, string $summary, string $calendarName): array {
private function subjectAndHeading(IL10N $l, string $action, string $actorName, string $summary, string $calendarName): array {
return match ($action) {
self::ACTION_CREATE => [
$l->t('%1$s created "%2$s" on your behalf', [$actorName, $summary]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
namespace OCA\DAV\Tests\unit\Connector\Sabre;

use OCA\DAV\CalDAV\DefaultCalendarValidator;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\File;
use OCA\DAV\DAV\CustomPropertiesBackend;
use OCA\DAV\Db\PropertyMapper;
use OCP\IDBConnection;
Expand Down
1 change: 0 additions & 1 deletion apps/encryption/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace OCA\Encryption;

use OC\Files\Storage\Storage;
use OC\Files\View;
use OCA\Encryption\Crypto\Crypt;
use OCP\Files\Storage\IStorage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use OCP\IRequest;
use OCP\Log\Audit\CriticalActionPerformedEvent;
use OCP\Server;
use OCP\Share;
use OCP\Share\Exceptions\ShareNotFound;
use Psr\Log\LoggerInterface;

Expand Down
3 changes: 2 additions & 1 deletion apps/federatedfilesharing/lib/FederatedShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use OC\Share20\Exception\InvalidShare;
use OC\Share20\Share;
use OCA\CloudFederationAPI\Db\OcmTokenMapMapper;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Authentication\Exceptions\InvalidTokenException;
use OCP\Authentication\Token\IToken;
use OCP\Constants;
Expand Down Expand Up @@ -749,7 +750,7 @@ public function getShareByToken(string $token): IShare {
->executeQuery();

$data = $cursor->fetch();
} catch (InvalidTokenException|\OCP\AppFramework\Db\DoesNotExistException) {
} catch (InvalidTokenException|DoesNotExistException) {
// Token is not a valid access token or has no mapping, share not found
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use OCA\Files_Sharing\External\ExternalShareMapper;
use OCA\Files_Sharing\External\Manager;
use OCA\GlobalSiteSelector\Service\SlaveService;
use OCA\Polls\Db\Share;
use OCP\Activity\IManager as IActivityManager;
use OCP\App\IAppManager;
use OCP\Constants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use OCP\Federation\ICloudIdManager;
use OCP\Files\IFilenameValidator;
use OCP\Files\ISetupManager;
use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IAppConfig;
Expand Down Expand Up @@ -261,7 +262,7 @@ public function testShareReceivedMustExchangeTokenStoresAccessToken(): void {
'token_type' => 'Bearer',
]));

$httpClient = $this->createMock(\OCP\Http\Client\IClient::class);
$httpClient = $this->createMock(IClient::class);
$httpClient->method('post')->willReturn($response);
$this->clientService->method('newClient')->willReturn($httpClient);

Expand Down Expand Up @@ -343,7 +344,7 @@ public function testShareReceivedOptionalExchangeStoresAccessTokenOnSuccess(): v
'token_type' => 'Bearer',
]));

$httpClient = $this->createMock(\OCP\Http\Client\IClient::class);
$httpClient = $this->createMock(IClient::class);
$httpClient->method('post')->willReturn($response);
$this->clientService->method('newClient')->willReturn($httpClient);

Expand Down
1 change: 0 additions & 1 deletion apps/files/lib/Service/OwnershipTransferService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IHomeMountProvider;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\File;
use OCP\Files\FileInfo;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand Down
1 change: 0 additions & 1 deletion apps/files_external/lib/MountConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace OCA\Files_External;

use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\EncryptionService;
use OCP\Server;
Expand Down
1 change: 0 additions & 1 deletion apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use OCA\Circles\Api\v1\Circles;
use OCA\Deck\Sharing\ShareAPIHelper;
use OCA\Federation\TrustedServers;
use OCA\Files\Helper;
use OCA\Files_Sharing\Exceptions\SharingRightsException;
use OCA\Files_Sharing\External\Storage;
use OCA\Files_Sharing\ResponseDefinitions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use Generator;
use OC\Collaboration\Collaborators\SearchResult;
use OC\Share\Share;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\ResponseDefinitions;
use OCP\App\IAppManager;
Expand Down
6 changes: 3 additions & 3 deletions apps/files_sharing/lib/External/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use OC\Files\Storage\BearerAuthAwareSabreClient;
use OC\Files\Storage\DAV;
use OC\ForbiddenException;
use OC\Share\Share;
use OCA\Files_Sharing\External\Manager as ExternalShareManager;
use OCA\Files_Sharing\ISharedStorage;
use OCP\AppFramework\Http;
Expand Down Expand Up @@ -95,7 +95,7 @@ public function __construct($options) {
// Shares created before the exchange-token capability was introduced have no
// stored token and must keep using basic auth for backwards compatibility.
if (!empty($options['access_token'])) {
$authType = \OC\Files\Storage\BearerAuthAwareSabreClient::AUTH_BEARER;
$authType = BearerAuthAwareSabreClient::AUTH_BEARER;
}

$host = parse_url($remote, PHP_URL_HOST);
Expand Down Expand Up @@ -130,7 +130,7 @@ public function __construct($options) {
'root' => $webDavEndpoint,
'user' => $options['token'],
'authType' => $authType,
'password' => $authType === \OC\Files\Storage\BearerAuthAwareSabreClient::AUTH_BEARER
'password' => $authType === BearerAuthAwareSabreClient::AUTH_BEARER
? (string)($options['access_token'] ?? '')
: (string)($options['password'] ?? ''),
'discoveryService' => $discoveryService,
Expand Down
1 change: 0 additions & 1 deletion apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use OC\Files\Storage\Wrapper\PermissionsMask;
use OC\Files\Storage\Wrapper\Wrapper;
use OC\Files\View;
use OC\Share\Share;
use OC\User\NoUserException;
use OCA\Files_Sharing\ISharedStorage as LegacyISharedStorage;
use OCP\Constants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
namespace OCA\Files_Sharing\Tests\Controller;

use OC\Files\Storage\Wrapper\Wrapper;
use OC\Session\Internal;
use OCA\Federation\TrustedServers;
use OCA\Files_Sharing\Controller\ShareAPIController;
use OCA\Files_Sharing\External\Storage;
Expand Down
1 change: 0 additions & 1 deletion apps/files_versions/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\Command\IBus;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
use OCP\Files\IMimeTypeDetector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use OCP\Activity\IManager;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Authentication\Exceptions\WipeTokenException;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
Expand Down Expand Up @@ -243,7 +244,7 @@ public function testDestroyWipePendingEmitsCancelledSubject(): void {
$this->tokenProvider->expects($this->once())
->method('getTokenById')
->with($tokenId)
->willThrowException(new \OCP\Authentication\Exceptions\WipeTokenException($token));
->willThrowException(new WipeTokenException($token));

// The token is still invalidated (the user opted into cancelling the wipe).
$this->tokenProvider->expects($this->once())
Expand Down
1 change: 0 additions & 1 deletion apps/user_ldap/lib/Controller/ConfigAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use OCA\User_LDAP\Exceptions\ConfigurationIssueException;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\ILDAPWrapper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\Settings\Admin;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
Expand Down
1 change: 0 additions & 1 deletion apps/user_ldap/lib/Controller/WizardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace OCA\User_LDAP\Controller;

use OCA\User_LDAP\Configuration;
use OCA\User_LDAP\ConnectionFactory;
use OCA\User_LDAP\Mapping\GroupMapping;
use OCA\User_LDAP\Mapping\UserMapping;
Expand Down
1 change: 0 additions & 1 deletion apps/user_ldap/lib/Jobs/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use OCA\User_LDAP\Configuration;
use OCA\User_LDAP\ConnectionFactory;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\Mapping\UserMapping;
use OCP\AppFramework\Services\IAppConfig;
use OCP\AppFramework\Utility\ITimeFactory;
Expand Down
1 change: 0 additions & 1 deletion apps/user_ldap/lib/LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use OCP\IConfig;
use OCP\ILogger;
use OCP\Profiler\IProfiler;
use OCP\Server;
use Psr\Log\LoggerInterface;

class LDAP implements ILDAPWrapper {
Expand Down
33 changes: 17 additions & 16 deletions apps/user_ldap/tests/User_LDAPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use OCA\User_LDAP\User\User;
use OCA\User_LDAP\User_LDAP;
use OCA\User_LDAP\UserPluginManager;
use OCP\Accounts\IAccountManager;
use OCP\HintException;
use OCP\IConfig;
use OCP\IGroupManager;
Expand Down Expand Up @@ -1464,24 +1465,24 @@ public function testImplementsAction(string $configurable, string|int $value, in
public static function canEditPropertyProvider(): array {
return [
// Display name is always managed by LDAP
[\OCP\Accounts\IAccountManager::PROPERTY_DISPLAYNAME, '', false],
[\OCP\Accounts\IAccountManager::PROPERTY_DISPLAYNAME, 'cn', false],
[IAccountManager::PROPERTY_DISPLAYNAME, '', false],
[IAccountManager::PROPERTY_DISPLAYNAME, 'cn', false],
// Fields with no LDAP attribute configured are user-editable
[\OCP\Accounts\IAccountManager::PROPERTY_EMAIL, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_PHONE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_WEBSITE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_ADDRESS, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_FEDIVERSE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_ORGANISATION, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_ROLE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_HEADLINE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_BIOGRAPHY, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_BIRTHDATE, '', true],
[\OCP\Accounts\IAccountManager::PROPERTY_PRONOUNS, '', true],
[IAccountManager::PROPERTY_EMAIL, '', true],
[IAccountManager::PROPERTY_PHONE, '', true],
[IAccountManager::PROPERTY_WEBSITE, '', true],
[IAccountManager::PROPERTY_ADDRESS, '', true],
[IAccountManager::PROPERTY_FEDIVERSE, '', true],
[IAccountManager::PROPERTY_ORGANISATION, '', true],
[IAccountManager::PROPERTY_ROLE, '', true],
[IAccountManager::PROPERTY_HEADLINE, '', true],
[IAccountManager::PROPERTY_BIOGRAPHY, '', true],
[IAccountManager::PROPERTY_BIRTHDATE, '', true],
[IAccountManager::PROPERTY_PRONOUNS, '', true],
// Fields with an LDAP attribute configured are managed by LDAP, not user-editable
[\OCP\Accounts\IAccountManager::PROPERTY_EMAIL, 'mail', false],
[\OCP\Accounts\IAccountManager::PROPERTY_PHONE, 'telephoneNumber', false],
[\OCP\Accounts\IAccountManager::PROPERTY_WEBSITE, 'labeledURI', false],
[IAccountManager::PROPERTY_EMAIL, 'mail', false],
[IAccountManager::PROPERTY_PHONE, 'telephoneNumber', false],
[IAccountManager::PROPERTY_WEBSITE, 'labeledURI', false],
];
}

Expand Down
1 change: 0 additions & 1 deletion core/BackgroundJobs/PreviewMigrationJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace OC\Core\BackgroundJobs;

use OC\Preview\Db\Preview;
use OC\Preview\PreviewMigrationService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
Expand Down
1 change: 0 additions & 1 deletion core/Command/Encryption/MigrateKeyStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace OC\Core\Command\Encryption;

use OC\Encryption\Keys\Storage;
use OC\Encryption\Util;
use OC\Files\View;
use OCP\IConfig;
Expand Down
1 change: 0 additions & 1 deletion core/Controller/ReferenceApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use OCP\AppFramework\OCSController;
use OCP\Collaboration\Reference\IDiscoverableReferenceProvider;
use OCP\Collaboration\Reference\IReferenceManager;
use OCP\Collaboration\Reference\Reference;
use OCP\IRequest;

/**
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version23000Date20210906132259.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version24000Date20220404230027.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version27000Date20230309104325.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
Expand Down
1 change: 0 additions & 1 deletion core/Migrations/Version29000Date20231126110901.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function resetStaticProperties(): void {
Filesystem::reset();
}

$handler = static function () {
$handler = static function (): void {
try {
resetStaticProperties();
OC::init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace OC\AppFramework\DependencyInjection;

use OC\AppFramework\App;
use OC\AppFramework\Bootstrap\Coordinator;
use OC\AppFramework\Http;
use OC\AppFramework\Http\Dispatcher;
Expand Down
1 change: 0 additions & 1 deletion lib/private/Authentication/Login/TwoFactorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use OC\Authentication\TwoFactorAuth\Manager;
use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor;
use OCP\Authentication\TwoFactorAuth\IProvider;
use OCP\IURLGenerator;
use function array_pop;
use function count;
Expand Down
Loading
Loading