Showing 3,235 of 4,504 total issues
Method getFontFile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getFontFile(array $info): string {
$fontFileDir = __DIR__;
$fontFileDir .= '/../../../core/fonts/';
$fontSet = [
Method userCreateChecks
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function userCreateChecks(\OCP\Share\IShare $share) {
$userTypeHelper = new UserTypeHelper();
$isGuestUser = $userTypeHelper->isGuestUser($share->getSharedWith());
// Check if we can share with group members only
// We still should be able to share with guest user even when it's not a group member
Method getAllSharesBy
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllSharesBy($userId, $shareTypes, $nodeIDs, $reshares) {
$shares = [];
$qb = $this->dbConn->getQueryBuilder();
$qb->select('*')
Method getPreview
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPreview() {
if ($this->preview !== null && $this->preview->valid()) {
return $this->preview;
}
Method loginInOwnCloud
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function loginInOwnCloud($loginType, $user, $password, $options = []) {
$login = $user->getUID();
// check the login policies first. It will throw a LoginException if needed
// The LoginPolicyManager can't be injected due to cyclic dependency
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln('<info>This feature is currently experimental.</info>');
$this->targetType = $this->connectionFactory->normalizeType($input->getArgument('type'));
$this->targetHostname = $input->getArgument('hostname');
$this->targetPort = $input->getOption('port');
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if (Filesystem::isPrimaryObjectStorageEnabled() === true) {
$output->writeln('<info>We detected that the instance is running on a S3 primary object storage, users might not be accurate</info>');
}
Method openWithWeb
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function openWithWeb(?string $file_id, ?string $app_name): DataResponse {
$userAgent = $this->request->getHeader('User-Agent') ?? '-';
$this->logger->info("openWithWeb($file_id, $app_name) - $userAgent");
$fileId = $this->extractFileId($file_id);
$nodes = $this->rootFolder->getById($fileId, true);
Method createShare
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$shareWith,
$name,
$description,
$providerId,
$owner,
Method sendMail
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$toaddress,
$toname,
$subject,
$mailtext,
$fromaddress,
Method getItems
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$itemType,
$item = null,
$shareType = null,
$shareWith = null,
$uidOwner = null,
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var self = this;
if (this._dialog) {
// remove/destroy older instance
this._dialog.model.off();
Function attach
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attach: function (view) {
var that = this;
var baseRenderCall = view.render;
var shareCollectionModel = view.model.getLinkSharesCollection();
Function reloadCallback
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reloadCallback: function(result) {
delete this._reloadCall;
this.hideMask();
if (!result || result.status === 'error') {
Function showAddExternalDialog
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
OCA.Sharing.showAddExternalDialog = function (share, passwordProtected, callback) {
var remote = share.remote;
var owner = share.ownerDisplayName || share.owner;
var name = share.name;
var remoteClean = (remote.substr(0, 8) === 'https://') ? remote.substr(8) : remote.substr(7);
Function _saveToOwnCloud
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_saveToOwnCloud: function (remote, token, owner, ownerDisplayName, name, isProtected) {
var that = this;
var toggleLoading = function () {
var isLoading = !that.$saveToOcButton.find('#save-to-oc-button-loading').hasClass('hidden');
Function actionHandler
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
actionHandler: function(fileName, context) {
var $actionEl = context.$file.find('.action-favorite');
var $file = context.$file;
var fileInfo = context.fileList.files[$file.index()];
var dir = context.dir || context.fileList.getCurrentDirectory();
Function triggerAction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerAction: function(actionName, fileInfoModel, fileList) {
var actionFunc;
var actions = this.get(
fileInfoModel.get('mimetype'),
fileInfoModel.isDirectory() ? 'dir' : 'file',
Function onPermissionChange
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onPermissionChange: function(event) {
var $element = $(event.target);
var $li = $element.closest('li');
var shareId = $li.data('share-id');
var shareType = $li.data('share-type');
Function joinPaths
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
joinPaths: function () {
if (arguments.length < 1) {
return '';
}
var path = '';