Showing 3,235 of 4,504 total issues
Method copy
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function copy($source, $destination) {
if (!$this->fileView) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
}
Method loadChildrenProperties
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function loadChildrenProperties(INode $node, $requestedProperties) {
// note: pre-fetching only supported for depth <= 1
if (!($node instanceof Directory)) {
return;
}
Method translateLong
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function translateLong($text, IL10N $l, array $params) {
switch ($text) {
case 'created_self':
return (string) $l->t('You created %1$s', $params);
case 'created_by':
Method verifyPath
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function verifyPath($path, $fileName) {
$l10n = \OC::$server->getL10N('lib');
// verify empty and dot files
$trimmed = \trim($fileName);
Method touch
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function touch($path, $mtime = null) {
$this->init();
if ($mtime === null) {
$mtime = \OC::$server->getTimeFactory()->getTime();
}
Method getTempBaseDir
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTempBaseDir(): string {
if ($this->tmpBaseDir) {
return $this->tmpBaseDir;
}
Method getTagsForObjects
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getTagsForObjects(array $objIds) {
$entries = [];
try {
$conn = \OC::$server->getDatabaseConnection();
Method splitUserRemote
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function splitUserRemote($id) {
if (\strpos($id, '@') === false) {
$l = \OC::$server->getL10N('lib');
$hint = $l->t('Invalid Federated Cloud ID');
throw new HintException('Invalid Federated Cloud ID', $hint);
Method run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run(IOutput $out) {
$ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
// NOTE TO DEVELOPERS: when adding new mime types, please make sure to
// add a version comparison to avoid doing it every time
Method createMailBody
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function createMailBody(
$filename,
$link,
$expiration,
$senderDisplayName,
Method getSharesBy
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset) {
$qb = $this->dbConn->getQueryBuilder();
$qb->select('*')
->from('share')
->andWhere($qb->expr()->orX(
Method getDescription
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDescription($errorCode, $errorObject) {
switch ($errorCode) {
case CodeChecker::STATIC_CALL_NOT_ALLOWED:
$functions = $this->getLocalFunctions();
$functions = \array_change_key_case($functions, CASE_LOWER);
Method buildNotExistingFileNameForView
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function buildNotExistingFileNameForView($path, $filename, \OC\Files\View $view) {
if ($path === '/') {
$path = '';
}
if ($pos = \strrpos($filename, '.')) {
Method isAuthorised
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function isAuthorised($action) {
$level = $action['authlevel'];
switch ($level) {
case API::GUEST_AUTH:
// Anyone can access
Method getDefaultPageUrl
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getDefaultPageUrl() {
$urlGenerator = \OC::$server->getURLGenerator();
// Deny the redirect if the URL contains a @
// This prevents unvalidated redirects like ?redirect_url=:user@domain.com
if (isset($_REQUEST['redirect_url']) && \strpos($_REQUEST['redirect_url'], '@') === false) {
Method analyzeStream
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function analyzeStream($stream, array $processors = [], int $maxBytes = PHP_INT_MAX) {
$byteCount = 0;
$map = [];
$processorActions = [
'count' => 'processCountChars',
Method acquireLock
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function acquireLock($path, $type) {
if (\strlen($path) > 64) { // max length in file_locks
throw new \InvalidArgumentException("Lock key length too long");
}
$expire = $this->getExpireTime();
Function fetchNext
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fetchNext: function(options) {
var self = this;
if (!this.hasMoreResults()) {
return null;
}
Function success
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success: function (apps) {
var appListWithIndex = _.indexBy(apps.apps, 'id');
OC.Settings.Apps.State.apps = appListWithIndex;
var appList = _.map(appListWithIndex, function(app) {
// default values for missing fields
Function translate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
translate: function(app, text, vars, count, options) {
var defaultOptions = {
escape: true
},
allOptions = options || {};