Showing 4,504 of 4,504 total issues
Function calculate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculate: function(files) {
var file;
var summary = {
totalDirs: 0,
totalFiles: 0,
Function getDescriptiveTag
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDescriptiveTag: function(tag) {
if (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {
tag = tag.toJSON();
}
Function addAndFetchFileInfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addAndFetchFileInfo: function(fileName, dir, options) {
var self = this;
var deferred = $.Deferred();
if (_.isUndefined(dir)) {
dir = this.getCurrentDirectory();
Function parse
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse: function(data) {
/* jshint camelcase: false */
if (data.ocs && data.ocs.data) {
// parse out of the ocs response
data = data.ocs.data;
Function lock
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lock: function(path, options) {
if (!path) {
throw 'Missing argument "path"';
}
var self = this;
Function showHtml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showHtml: function (html, options) {
options = options || {};
_.defaults(options, {
timeout: 0
});
Method getPanel
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPanel() {
$activeLangCode = $this->config->getUserValue(
$this->userSession->getUser()->getUID(),
'core',
'lang',
Method isTargetAllowed
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function isTargetAllowed($target) {
$currentMount = $this->getMountPoint();
// note: $currentMount has a trailing slash. It doesn't matter for the check below
$isRename = \dirname($currentMount) === \dirname($target);
Method setPasswordForm
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setPasswordForm($token, $userId) {
try {
$this->checkPasswordSetToken($token, $userId);
} catch (UserTokenException $e) {
if ($e instanceof UserTokenExpiredException) {
Method addCertificate
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function addCertificate(ICertificateManager $certificateManager) {
$headers = [];
if ($this->request->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE_8])) {
// due to upload iframe workaround, need to set content-type to text/plain
$headers['Content-Type'] = 'text/plain';
Method getAuthors
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getAuthors($file, $gitRoot) {
// only add authors that changed code and not the license header
$licenseHeaderEndsAtLine = \trim(\shell_exec(\sprintf("grep -n '*/' %s | head -n 1 | cut -d ':' -f 1", \escapeshellarg($file))));
$buildDir = \getcwd();
Method getShareFolder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getShareFolder($view = null) {
if ($view === null) {
$view = Filesystem::getView();
}
// for guests we default to root as their home storage is read-only
Method getPermissionsFromRequest
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getPermissionsFromRequest() {
// int-based permissions are set -> use them
$permissions = $this->request->getParam('permissions', null);
if ($permissions !== null) {
return $permissions;
Method deleteVersions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function deleteVersions(View $view, $file, $user) {
$size = 0;
if (\OCP\App::isEnabled('files_versions')) {
if ($view->is_dir('files_trashbin/versions/' . $file)) {
$size += self::calculateSize(new View('/' . $user . '/files_trashbin/versions/' . $file));
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$users = $input->getArgument('user_id');
if (!empty($users)) {
foreach ($users as $user) {
if ($this->userManager->userExists($user)) {
Method ocmDiscover
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function ocmDiscover($remote) {
// Check if something is in the cache
if ($cacheData = $this->cache->get('OCM' . $remote)) {
return \json_decode($cacheData, true);
}
Method splitUserRemote
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function splitUserRemote($address) {
if (\strpos($address, '@') === false) {
$hint = $this->l->t('Invalid Federated Cloud ID');
throw new HintException('Invalid Federated Cloud ID', $hint);
}
Method getUsers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUsers() {
$search = !empty($_GET['search']) ? $_GET['search'] : '';
$limit = !empty($_GET['limit']) ? $_GET['limit'] : null;
$offset = !empty($_GET['offset']) ? $_GET['offset'] : null;
Method getMultipleCalendarObjects
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMultipleCalendarObjects($calendarId, array $uris) {
$chunkSize = 998;
if (\count($uris) <= $chunkSize) {
$query = $this->db->getQueryBuilder();
$query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'calendardata', 'componenttype', 'classification'])
Method initialize
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function initialize(\Sabre\DAV\Server $server) {
$server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
$server->protectedProperties[] = self::FILEID_PROPERTYNAME;
$server->protectedProperties[] = self::INTERNAL_FILEID_PROPERTYNAME;
$server->protectedProperties[] = self::PERMISSIONS_PROPERTYNAME;