Showing 3,235 of 4,504 total issues
Function getShareeObject
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getShareeObject: function(shareIndex) {
var shareWith = this.model.getShareWith(shareIndex);
var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex);
var shareType = this.model.getShareType(shareIndex);
var shareWithAdditionalInfo = this.model.getShareWithAdditionalInfo(shareIndex);
Function getShareeList
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getShareeList: function() {
var universal = {
avatarEnabled: this.configModel.areAvatarsEnabled(),
mailNotificationEnabled: this.configModel.isMailNotificationEnabled(),
notifyByMailLabel: t('core', 'notify by email'),
Method isUsedTlsLibOutdated
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function isUsedTlsLibOutdated(): string {
// Don't run check when:
// 1. Server has `has_internet_connection` set to false
// 2. App Store AND S2S is disabled
if (!$this->config->getSystemValue('has_internet_connection', true)) {
Method handleException
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleException($e) {
$request = \OC::$server->getRequest();
// in case the request content type is text/xml - we assume it's a WebDAV request
$isXmlContentType = \strpos($request->getHeader('Content-Type') ?? '', 'text/xml');
if ($isXmlContentType === 0) {
Method doDelete
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function doDelete($path, $method) {
if (self::$disableTrash
|| !\OC_App::isEnabled('files_trashbin')
|| (\pathinfo($path, PATHINFO_EXTENSION) === 'part')
|| $this->shouldMoveToTrash($path) === false
Method registerService
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function registerService() {
$container = $this->getContainer();
$container->registerService('addServerMiddleware', function (IAppContainer $c) {
return new AddServerMiddleware(
Method getCalendarByUri
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getCalendarByUri($principal, $uri) {
$fields = \array_values($this->propertyMap);
$fields[] = 'id';
$fields[] = 'uri';
$fields[] = 'synctoken';
Method createCardsTable
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createCardsTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}cards")) {
$table = $schema->createTable("{$this->prefix}cards");
$table->addColumn('id', 'integer', [
'autoincrement' => true,
Method displayPanel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function displayPanel() {
$lastUpdateCheck = $this->dateTimeFormatter->formatDateTime(
$this->config->getAppValue('core', 'lastupdatedat')
);
Method httpGet
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function httpGet(RequestInterface $request, ResponseInterface $response) {
// Only handle valid files
$node = $this->tree->getNodeForPath($request->getPath());
if (!($node instanceof IFile)) {
return;
Method getACL
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getACL() {
$acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
Method handleGetProperties
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleGetProperties(
PropFind $propFind,
\Sabre\DAV\INode $sabreNode
) {
if (!($sabreNode instanceof \OCA\DAV\Connector\Sabre\Node)) {
Method formatFileInfo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function formatFileInfo(FileInfo $i) {
$entry = [];
$entry['id'] = $i['fileid'];
$entry['parentId'] = $i['parent'];
Method check
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function check() {
// Look up the cache - it is invalidated all 30 minutes
if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > \time()) {
return \json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
}
Method __construct
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($prefix = '') {
parent::__construct($prefix);
if (self::$cache === null) {
self::$cache = new \Memcached();
Method __construct
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($params) {
$this->statCache = new ArrayCache();
$this->httpClientService = \OC::$server->getHTTPClientService();
$this->webDavClientService = \OC::$server->getWebDavClientService();
if (isset($params['host'], $params['user'], $params['password'])) {
Method renameFromStorage
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function renameFromStorage(IStorage $sourceStorage, $source, $target) {
if (!$this->enabled or Scanner::isPartialFile($source) or Scanner::isPartialFile($target)) {
return;
}
Method calculateFolderSize
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calculateFolderSize($path, $entry = null) {
$totalSize = 0;
if ($entry === null or !isset($entry['fileid'])) {
$entry = $this->get($path);
}
Method touch
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function touch($path, $mtime = null) {
if ($mtime === null) {
$mtime = \time();
}
Method createSpecificUser
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createSpecificUser($username, $connection) {
try {
//user already specified in config
$oldUser = $this->config->getSystemValue('dbuser', false);