Showing 3,235 of 4,504 total issues
Method syncRemoteAddressBook
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function syncRemoteAddressBook($url, $userName, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetProperties) {
// 1. create addressbook
$book = $this->ensureSystemAddressBookExists($targetPrincipal, $targetBookId, $targetProperties);
$addressBookId = $book['id'];
Method updateAddressBook
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) {
$supportedProperties = [
'{DAV:}displayname',
'{' . Plugin::NS_CARDDAV . '}addressbook-description',
];
Method deleteCard
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deleteCard($addressBookId, $cardUri) {
try {
$cardId = $this->getCardId($addressBookId, $cardUri);
} catch (\InvalidArgumentException $e) {
$cardId = null;
Method delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function delete($path) {
$deletedFile = self::$deletedFiles[$path];
$uid = $deletedFile['uid'];
$filename = $deletedFile['filename'];
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(array $urlParams = []) {
parent::__construct('files_versions', $urlParams);
$container = $this->getContainer();
Method adjustShareOwner
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function adjustShareOwner($shareId, $shareType, $newUidOwner) {
$query = $this->connection->getQueryBuilder();
$query->update('share')
->set('uid_owner', $query->createParameter('uid_owner'))
Method userScan
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function userScan($users, $inputPath, $shouldRepairStoragesIndividually, $input, $output, $verbose) {
$users_total = \count($users);
$user_count = 0;
foreach ($users as $user) {
if (\is_object($user)) {
Method checkConfig
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function checkConfig() {
$l = \OC::$server->getL10N('lib');
// Create config if it does not already exist
$configFilePath = self::$configDir .'/config.php';
Method getAllTags
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllTags($visibilityFilter = null, $nameSearchPattern = null) {
$tags = [];
$query = $this->connection->getQueryBuilder();
$query->select('*')
Method getCacheEntry
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getCacheEntry($storage, $internalPath, $relativePath) {
$cache = $storage->getCache($internalPath);
$data = $cache->get($internalPath);
$watcher = $storage->getWatcher($internalPath);
Method haveTag
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function haveTag($objIds, $objectType, $tagId, $all = true) {
$this->assertTagsExist([$tagId]);
if (!\is_array($objIds)) {
$objIds = [$objIds];
Method updateEncryptedVersion
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function updateEncryptedVersion(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $isRename) {
$isEncrypted = $this->encryptionManager->isEnabled() && $this->mount->getOption('encrypt', true) ? 1 : 0;
$cacheInformation = [
'encrypted' => (bool)$isEncrypted,
];
Method moveFromStorage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($sourceStorage === $this) {
return $this->copy($sourceInternalPath, $targetInternalPath);
}
// cross storage moves need to perform a move operation
Method addToCache
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addToCache(ICachedMountInfo $mount) {
if ($mount->getStorageId() !== -1) {
try {
$rows = $this->connection->insertIfNotExist(
'*PREFIX*mounts',
Method rename
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function rename($path1, $path2) {
$this->init();
$path1 = $this->cleanPath($path1);
$path2 = $this->cleanPath($path2);
try {
Method calculateFolderSize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calculateFolderSize($path, $entry = null) {
if ($path !== '/' and $path !== '' and $path !== 'files' and $path !== 'files_trashbin' and $path !== 'files_versions') {
return parent::calculateFolderSize($path, $entry);
} elseif ($path === '' or $path === '/') {
// since the size of / isn't used (the size of /files is used instead) there is no use in calculating it
Method createStorage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createStorage(
$mountPoint,
$backendIdentifier,
$authMechanismIdentifier,
$backendOptions,
Method createDBUser
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createDBUser($connection) {
$e_name = \pg_escape_string($this->dbUser);
$e_password = \pg_escape_string($this->dbPassword);
$query = "select * from pg_roles where rolname='$e_name';";
$result = \pg_query($connection, $query);
Method moveAvatars
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function moveAvatars(IOutput $out, IUser $user) {
$userId = $user->getUID();
try {
\OC\Files\Filesystem::initMountPoints($userId);
Method removeSharesNonExistingParent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function removeSharesNonExistingParent(IOutput $out) {
$deletedEntries = 0;
$query = $this->connection->getQueryBuilder();
$query->select('s1.parent')