Showing 3,235 of 4,504 total issues
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
OcmMiddleware $ocmMiddleware,
IURLGenerator $urlGenerator,
IUserManager $userManager,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IJobList $jobList,
ISecureRandom $secureRandom,
IConfig $config,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IURLGenerator $urlGenerator,
IL10N $l10n,
IConfig $config,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
IRequest $request,
ControllerMethodReflector $reflector,
INavigationManager $navigationManager,
IURLGenerator $urlGenerator,
ILogger $logger,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
IUserManager $manager,
ISession $session,
ITimeFactory $timeFactory,
IProvider $tokenProvider,
IConfig $config,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IUserManager $userManager,
IConfig $config,
ISession $session,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IAvatarManager $avatarManager,
File $cache,
IL10N $l10n,
Function _addAppPassword
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_addAppPassword: function() {
var _this = this;
var deviceName = this._tokenName.val();
if (!deviceName) {
Function getDefaultFileActions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDefaultFileActions: function(mime, type, permissions) {
var mimePart;
if (mime) {
mimePart = mime.substr(0, mime.indexOf('/'));
}
Function uploads
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
selection.uploads = _.filter(selection.uploads, function(upload) {
var file = upload.getFile();
if (file.relativePath) {
// can't check in subfolder contents, let backend handle this
return true;
Function _legacyFillCurrentShares
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_legacyFillCurrentShares: function(shares) {
var fileId = this.fileInfoModel.get('id');
if (!shares || !shares.length) {
delete OC.Share.statuses[fileId];
OC.Share.currentShares = {};
Function _handleAddShareAttributes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_handleAddShareAttributes: function(properties, options) {
var shareAttributesV1 = [];
var filteredRegisteredAttributes = this._filterRegisteredAttributes(properties.permissions);
_.map(filteredRegisteredAttributes, function (filteredRegisteredAttribute) {
var isCompatible = true;
Function renderFileResult
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.renderFileResult = function($row, result) {
if (inFileList($row, result)) {
return null;
}
hideNoFilterResults();
Function getFileInfo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFileInfo: function(path, options) {
if (!path) {
path = '';
}
options = options || {};
Method generateTokenAndSendMail
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function generateTokenAndSendMail($userId, $email) {
$token = $this->secureRandom->generate(
21,
ISecureRandom::CHAR_DIGITS,
ISecureRandom::CHAR_LOWER,
Method notifyPublicLinkRecipientsByEmail
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function notifyPublicLinkRecipientsByEmail($link, $recipients, $personalNote) {
# verify that the link is for a trusted domain
if (!$this->trustedDomainHelper->isUrlTrusted($link)) {
return new Result(null, 400, "Invalid shared link");
}
Method createComment
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createComment($objectType, $objectId, $data, $contentType = 'application/json') {
if (\explode(';', $contentType)[0] === 'application/json') {
$data = \json_decode($data, true);
} else {
throw new UnsupportedMediaType();
Method createShareObject
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createShareObject($data) {
$share = new Share($this->rootFolder, $this->userManager);
$share->setId($data['id'])
->setShareType((int)$data['share_type'])
->setPermissions((int)$data['permissions'])
Method getUsersGroups
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUsersGroups($parameters) {
// Check if user is logged in
$loggedInUser = $this->userSession->getUser();
if ($loggedInUser === null) {
return new Result(null, API::RESPOND_UNAUTHORISED);
Method update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update($name, $userVisible, $userAssignable, $userEditable = false) {
try {
if (!$this->tagManager->canUserSeeTag($this->tag, $this->user)) {
throw new NotFound('Tag with id ' . $this->tag->getId() . ' does not exist');
}