Showing 3,235 of 4,504 total issues
Method getUser
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUser($parameters) {
$userId = $parameters['userid'];
// Check if user is logged in
$currentLoggedInUser = $this->userSession->getUser();
Method check
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function check(RequestInterface $request, ResponseInterface $response) {
$node = $this->resolveShare($request->getPath());
if (!$node instanceof PublicSharedRootNode) {
return [true, 'principals/system/public'];
}
Method getSystemTagFileIds
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getSystemTagFileIds($systemTagIds) {
$resultFileIds = null;
// check user permissions, if applicable
if (!$this->isAdmin()) {
Method getChild
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChild($name, $info = null) {
if (!$this->info->isReadable()) {
// avoid detecting files through this way
throw new SabreNotFound();
}
Method updateStorageStatus
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateStorageStatus(IStorageConfig &$storage, $testOnly = true) {
try {
$this->manipulateStorageConfig($storage);
/** @var Backend */
Method checkQuota
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkQuota($path, $length = null, $extraSpace = 0) {
if ($length === null) {
$length = $this->getLength();
}
if ($length !== null) {
Method processUserChunks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function processUserChunks($input, $output, $users, $inputPath, $shouldRepairStoragesIndividually, $group = null) {
# no messaging level option means: no full printout but statistics
# $quiet means no print at all
# $verbose means full printout including statistics
# -q -v full stat
Method hasUpdated
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function hasUpdated($path, $time) {
if ($this->is_file($path)) {
return parent::hasUpdated($path, $time);
}
Method getTagIdsForObjects
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTagIdsForObjects($objIds, $objectType) {
if (!\is_array($objIds)) {
$objIds = [$objIds];
} elseif (empty($objIds)) {
return [];
Method stream_seek
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stream_seek($offset, $whence = SEEK_SET) {
$return = false;
switch ($whence) {
case SEEK_SET:
Method copyFromStorage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
if ($sourceStorage === $this) {
return $this->copy($sourceInternalPath, $targetInternalPath);
}
Method getBackendStatus
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getBackendStatus($class, $options, $isPersonal, $testOnly = true) {
if (self::$skipTest) {
return StorageNotAvailableException::STATUS_SUCCESS;
}
$user = \OC::$server->getUserSession()->getUser();
Method setExpirationDate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function setExpirationDate($itemType, $itemSource, $date, $shareTime = null) {
$user = \OC_User::getUser();
$l = \OC::$server->getL10N('lib');
if ($date == '') {
Method run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run(IOutput $out) {
if (!$this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
return;
}
Method validateExpireDate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function validateExpireDate($expireDate, $shareTime, $itemType, $itemSource) {
$l = \OC::$server->getL10N('lib');
$date = new \DateTime($expireDate);
$today = new \DateTime('now');
Method processSimpleRoutes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processSimpleRoutes($routes) {
$simpleRoutes = isset($routes['routes']) ? $routes['routes'] : [];
foreach ($simpleRoutes as $simpleRoute) {
$name = $simpleRoute['name'];
$postfix = '';
Method isCached
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function isCached() {
$fileId = $this->getFile()->getId();
if ($fileId === null) {
return false;
}
Method isAppCompatible
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function isAppCompatible($ocVersion, $appInfo) {
$requireMin = '';
$requireMax = '';
if (isset($appInfo['dependencies']['owncloud']['@attributes']['min-version'])) {
$requireMin = $appInfo['dependencies']['owncloud']['@attributes']['min-version'];
Method getShippedApps
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function getShippedApps() {
$shippedApps = [];
foreach (\OC::$APPSROOTS as $app_dir) {
if ($dir = \opendir($app_dir['path'])) {
$nodes = \scandir($app_dir['path']);
Method useBackend
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function useBackend($backend = 'database') {
if ($backend instanceof \OCP\UserInterface) {
self::$_usedBackends[\get_class($backend)] = $backend;
\OC::$server->getUserManager()->registerBackend($backend);
} else {