Showing 3,235 of 4,504 total issues
Method displayNamesInGroup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
$group = $this->get($gid);
if ($group === null) {
return [];
}
Method mimeTypeIcon
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function mimeTypeIcon($mimetype) {
$this->loadAliases();
while (isset($this->mimeTypeAlias[$mimetype])) {
$mimetype = $this->mimeTypeAlias[$mimetype];
Method registerBackend
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) {
if (self::isEnabled()) {
if (!isset(self::$backendTypes[$itemType])) {
self::$backendTypes[$itemType] = [
'class' => $class,
Method resolveGroupShares
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function resolveGroupShares($shares, $userId) {
$qb = $this->dbConn->getQueryBuilder();
list($chunkedShareIds, $shareIdToShareMap) = $this->chunkSharesToMaps($shares);
foreach ($chunkedShareIds as $shareIdsChunk) {
Method executeAudited
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function executeAudited($stmt, array $parameters = null) {
if (\is_string($stmt)) {
// convert to an array with 'sql'
if (\stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT
// TODO try to convert LIMIT OFFSET notation to parameters
Method removeListener
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function removeListener($scope = null, $method = null, callable $callback = null) {
$names = [];
$allNames = \array_keys($this->listeners);
if ($scope and $method) {
$name = $scope . '::' . $method;
Method getNormalizedLanguages
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getNormalizedLanguages(IFactory $langFactory, $activeLangCode) {
$userLang = null;
$commonLanguages = [];
$languages = [];
Method delete
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete(): bool {
if ($this->emitter) {
$this->emitter->emit('\OC\User', 'preDelete', [$this]);
}
// get the home now because it won't return it after user deletion
Method execute
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if (!$input->getOption('accept-warning')) {
$helper = new QuestionHelper();
$q = <<<EOS
<question>This command is for maintenance and support purposes.
Method configure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function configure() {
parent::configure();
$this
->setName('app:list')
Function createDragShadow
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createDragShadow = function(event) {
// FIXME: inject file list instance somehow
/* global FileList, Files */
//select dragged file
Function _updateDetailsView
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateDetailsView: function(fileName, show) {
if (!this._detailsView) {
return;
}
Function addResults
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addResults(results) {
var $template = $searchResults.find('tr.template');
jQuery.each(results, function (i, result) {
var $row = $template.clone();
$row.removeClass('template');
Method sendTestMail
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendTestMail() {
$email = $this->request->getParam('mail_to_address');
if (empty($email)) {
$email = $this->userSession->getUser()->getEMailAddress();
Method getMissingInitiator
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getMissingInitiator($n = 1000) {
$query = $this->connection->getQueryBuilder();
$query->select(['id', 'uid_owner', 'share_type'])
->from($this->table)
->where($query->expr()->in(
Method acceptShare
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function acceptShare($id) {
$share = $this->getShare($id);
if ($share) {
$mountPoint = $this->getShareRecipientMountPoint($share);
Method emitAccessShareHook
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function emitAccessShareHook($share, $errorCode = 200, $errorMessage = '') {
$itemType = $itemSource = $uidOwner = '';
$token = $share;
$exception = null;
if ($share instanceof \OCP\Share\IShare) {
Method parseRetentionObligation
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function parseRetentionObligation() {
$splitValues = \explode(',', $this->retentionObligation);
if (!isset($splitValues[0])) {
$minValue = self::DEFAULT_RETENTION_OBLIGATION;
} else {
Method createConfidentialObject
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function createConfidentialObject($calData) {
$vObject = Reader::read($calData);
/** @var Component $vElement */
$vElement = null;
Method unshare
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function unshare($remoteId, $shareToken) {
$query = $this->dbConnection->getQueryBuilder();
$query->select('*')->from($this->externalShareTable)
->where(
$query->expr()->eq(