Showing 3,235 of 4,504 total issues
Method getShareById
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getShareById($id, $recipientId = null) {
if (!ctype_digit($id)) {
// share id is defined as a field of type integer
// if someone calls the API asking for a share id like "abc"
// then there is no point trying to query the database,
Method getSharesBy
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSharesBy($userId, $shareType, $path = null, $reshares = false, $limit = 50, $offset = 0) {
if ($path !== null &&
!($path instanceof \OCP\Files\File) &&
!($path instanceof \OCP\Files\Folder)) {
throw new \InvalidArgumentException('invalid path');
Method decryptAllUsersFiles
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function decryptAllUsersFiles($user = '') {
$this->output->writeln("\n");
$progress = new ProgressBar($this->output);
$progress->setFormat(" %message% \n [%bar%]");
Method execute
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$t = new Table($output);
$displayInvalidJobs = $input->getOption('display-invalid-jobs');
$headers = ['Job ID', 'Job', 'Job Arguments', 'Last Run', 'Last Checked', 'Reserved At', 'Execution Duration (s)'];
if ($displayInvalidJobs) {
Method __construct
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IConfig $config,
IURLGenerator $urlGenerator,
IUserManager $userManager,
Function _onClickRestoreSelected
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onClickRestoreSelected: function(event) {
event.preventDefault();
var self = this;
var allFiles = this.$el.find('.select-all').is(':checked');
var files = [];
Function attach
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attach: function(fileList) {
this._extendFileActions(fileList);
var oldCreateRow = fileList._createRow;
fileList._createRow = function(fileData) {
Function send
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send = function () {
that._sending += 1;
// Set timer for bitrate progress calculation:
options._bitrateTimer = new that._BitrateTimer();
jqXHR = jqXHR || (
Function _checkSecurityHeaders
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_checkSecurityHeaders: function(xhr) {
var messages = [];
if (xhr.status === 200) {
var securityHeaders = {
Function _checkSSL
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_checkSSL: function(xhr) {
var messages = [];
if (xhr.status === 200) {
var docPlaceholderUrl = '';
Function filePath
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
filePath: function (app, type, file) {
var isCore = OC.coreApps.indexOf(app) !== -1,
link = OC.getRootPath();
if (file.substring(file.length - 3) === 'php' && !isCore) {
link += '/index.php/apps/' + app;
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Method buildSuperShares
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function buildSuperShares(array $allShares, \OCP\IUser $user) {
$result = [];
$groupedShares = $this->groupShares($allShares);
Method getShares
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getShares($includingPending = false) {
$shares = [];
$groupExternalManager = null;
foreach ($this->externalManager->getAcceptedShares() as $shareInfo) {
Method fopen
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fopen($path, $mode) {
if ($source = $this->getSourcePath($path)) {
switch ($mode) {
case 'r+':
case 'rb+':
Method requestReShare
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission) {
$data = [
'shareWith' => $shareWith,
'senderId' => $shareId
];
Method getChangesForCalendar
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) {
// Current synctoken
$stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?');
$stmt->execute([ $calendarId ]);
$currentToken = $stmt->fetchColumn(0);
Method getChangesForAddressBook
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null) {
// Current synctoken
$stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*addressbooks` WHERE `id` = ?');
$stmt->execute([ $addressBookId ]);
$currentToken = $stmt->fetchColumn();
Method printUpgradePage
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function printUpgradePage() {
$systemConfig = \OC::$server->getSystemConfig();
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
$tooBig = false;
Method stream_open
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stream_open($path, $mode, $options, &$opened_path) {
switch ($mode[0]) {
case 'r':
if (!isset(self::$data[$path])) {
return false;