Showing 3,235 of 4,504 total issues
Method insert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function insert($file, array $data) {
// normalize file
$file = $this->normalize($file);
if (isset($this->partial[$file])) { //add any saved partial data
Method normalizePath
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false, $keepUnicode = false) {
if (self::$normalizedPathCache === null) {
self::$normalizedPathCache = new CappedMemoryCache();
}
Method verifyAppSignature
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function verifyAppSignature($appId, $path = '', $force = false) {
try {
if ($path === '') {
$path = $this->appLocator->getAppPath($appId);
}
Method __construct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($storage, $isAvailable = true) {
if ($storage instanceof \OC\Files\Storage\Storage) {
$this->storageId = $storage->getId();
} else {
$this->storageId = $storage;
Method tagAs
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tagAs($objid, $tag) {
if (\is_string($tag) && !\is_numeric($tag)) {
$tag = \trim($tag);
if ($tag === '') {
\OCP\Util::writeLog('core', __METHOD__.', Cannot add an empty tag', \OCP\Util::DEBUG);
Method oldDatabaseTables
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function oldDatabaseTables() {
return [
'calendar_calendars',
'calendar_objects',
'calendar_share_calendar',
Method changeSchema
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function changeSchema(Schema $schema, array $options) {
$prefix = $options['tablePrefix'];
if ($schema->hasTable("{$prefix}jobs")) {
$jobsTable = $schema->getTable("{$prefix}jobs");
Method processOCS
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processOCS(array $routes) {
$ocsRoutes = isset($routes['ocs']) ? $routes['ocs'] : [];
foreach ($ocsRoutes as $ocsRoute) {
$name = $ocsRoute['name'];
$postFix = '';
Method executeController
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function executeController($controller, $methodName) {
$arguments = [];
// valid types that will be casted
$types = ['int', 'integer', 'bool', 'boolean', 'float'];
Method updateApp
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function updateApp($appId) {
\OC::$server->getAppManager()->clearAppsCache();
$appPath = self::getAppPath($appId);
if ($appPath === false) {
return false;
Method checkAppForUser
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkAppForUser($enabled, $appName, $user) {
if ($user !== null) {
$userAppAttributes = $user->getExtendedAttributes();
/**
* Guests will only have access to some whitelisted apps
Method needUpgrade
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function needUpgrade(\OCP\IConfig $config) {
if ($config->getSystemValue('installed', false)) {
$installedVersion = $config->getSystemValue('version', '0.0.0');
$currentVersion = \implode('.', \OCP\Util::getVersion());
$versionDiff = \version_compare($currentVersion, $installedVersion);
Method l
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function l($type, $data = null, $options = []) {
// Use the language of the instance
$locale = $this->getLanguageCode();
if ($locale === 'sr@latin') {
$locale = 'sr_latn';
Method delete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete($id) {
return $this->emittingCall(function () use (&$id) {
if (!\is_string($id)) {
throw new \InvalidArgumentException('Parameter must be string');
}
Method execute
has 31 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, user directories count might not be accurate</info>');
}
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->encryptionManager->isEnabled() === false) {
throw new \Exception('Server side encryption is not enabled');
}
$yes = $input->getOption('yes');
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $this->getUser($input);
$userId = $user->getUID();
$oldHome = $user->getHome();
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$path = $input->getOption('path');
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');
if ($path === null || $privateKeyPath === null || $keyBundlePath === null) {
Method getAvatar
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAvatar($userId, $size) {
if ($size > 2048) {
$size = 2048;
} elseif ($size <= 0) {
$size = 64;
Function writeParameterInput
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
writeParameterInput: function($td, parameter, placeholder, classes) {
var hasFlag = function(flag) {
return (placeholder.flags & flag) === flag;
};
classes = $.isArray(classes) ? classes : [];