Showing 4,504 of 4,504 total issues
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')
Method fixEntriesWithNonExistingParentIdEntry
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function fixEntriesWithNonExistingParentIdEntry(IOutput $out, $storageNumericId = null) {
$qb = $this->connection->getQueryBuilder();
$this->addQueryConditionsNonExistingParentIdEntry($qb, $storageNumericId);
$qb->setMaxResults(self::CHUNK_SIZE);
Method getSharedItemsOwners
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSharedItemsOwners($user, $type, $includeCollections = false, $includeOwner = false) {
// First, we find out if $type is part of a collection (and if that collection is part of
// another one and so on).
$collectionTypes = [];
if (!$includeCollections || !$collectionTypes = self::getCollectionItemTypes($type)) {
Method getChildren
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChildren(\OCP\Share\IShare $parent) {
$children = [];
$qb = $this->dbConn->getQueryBuilder();
$qb->select('*')
Method writeData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function writeData() {
// Create a php file ...
$content = "<?php\n";
$content .= '$CONFIG = ';
$content .= \var_export($this->cache, true);
Method addUseNameToBlackList
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addUseNameToBlackList($name, $alias) {
$name = \strtolower($name);
$alias = \strtolower($alias);
foreach ($this->blackListedClassNames as $blackListedAlias => $blackListedClassName) {
Method addDirRecursive
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addDirRecursive($dir, $internalDir='') {
$dirname = \basename($dir);
$rootDir = $internalDir . $dirname;
if (!empty($rootDir)) {
$dirOpts = [
Method preciseResize
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preciseResize($width, $height) {
if (!$this->valid()) {
$this->logger->error(__METHOD__ . '(): No image loaded', ['app' => 'core']);
return false;
}
Method analyzeOC
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function analyzeOC(array $dependencies, array $appInfo) {
$missing = [];
$minVersion = null;
if (isset($dependencies['owncloud']['@attributes']['min-version'])) {
$minVersion = $dependencies['owncloud']['@attributes']['min-version'];
Method rmdirr
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function rmdirr($dir, $deleteSelf = true) {
if (\is_dir($dir)) {
$files = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::CHILD_FIRST
Method setStatus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function setStatus($status) {
$protocol = \OC::$server->getRequest()->getHttpProtocol();
switch ($status) {
case self::STATUS_NOT_MODIFIED:
$status = $status . ' Not Modified';