Showing 3,235 of 4,504 total issues
Method enterNode
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function enterNode(\PhpParser\Node $node) {
if ($this->deprecatedClass) {
return;
}
Method destroy
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function destroy($id) {
$userId = $this->userSession->getUser()->getUID();
$user = $this->userManager->get($id);
if ($userId === $id) {
Method scan
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function scan($share) {
// get mount
$options = [
'remote' => $share['remote'],
'token' => $share['share_token'],
Method execute
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln("WARNING: incoming-shares:poll has been deprecated and replaced by periodic external shares cronjob. Please check Federated Cloud Sharing settings and documentation.");
if ($this->externalMountProvider === null) {
$output->writeln("Polling is not possible when files_sharing app is disabled. Please enable it with 'occ app:enable files_sharing'");
return 1;
Method execute
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$checkUploadExistsLocal = $input->getOption('local') === true;
$d = $input->getArgument('minimum-age-in-days');
$d = \max(2, \min($d, 100));
$cutOffTime = new \DateTime("$d days ago");
Method calendarQuery
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function calendarQuery($calendarId, array $filters) {
$componentType = null;
$requirePostFilter = true;
$timeRange = null;
Method getBuiltInPanel
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getBuiltInPanel($className) {
$panels = [
// Personal
Profile::class => new Profile(
$this->config,
Method fixUnencryptedSize
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function fixUnencryptedSize($path, $size, $unencryptedSize) {
$headerSize = $this->getHeaderSize($path);
$header = $this->getHeader($path);
$encryptionModule = $this->getEncryptionModule($path);
Method setValue
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setValue($app, $key, $value) {
if ($value === null) {
$value = '';
}
Method buildProviderList
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function buildProviderList() {
$services = [
'PRIVATE_DATA' => [
'version' => 1,
'endpoints' => [
Method fixEntriesWithCorrectParentIdButWrongPath
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function fixEntriesWithCorrectParentIdButWrongPath(IOutput $out, $storageNumericId = null) {
$totalResultsCount = 0;
$affectedStorages = [$storageNumericId => true];
// find all entries where the path entry doesn't match the path value that would
Method loginUser
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function loginUser() {
if (self::$isLoggedIn === true) {
return \OC_User::getUser();
}
Method changeSchema
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function changeSchema(Schema $schema, array $options) {
$prefix = $options['tablePrefix'];
$table = $schema->createTable("{$prefix}accounts");
$table->addColumn('id', Type::BIGINT, [
'autoincrement' => true,
Method execute
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('list')) {
$backends = $this->userManager->getBackends();
foreach ($backends as $backend) {
$output->writeln(\get_class($backend));
Method buildWebUri
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function buildWebUri(array $app_info, string $fileId): ?string {
$uri = null;
$app_name = $app_info['oc_app_name'];
# https://github.com/ONLYOFFICE/onlyoffice-owncloud/blob/2afca075249f24d857f0b3097d565f5129e88d17/appinfo/routes.php#LL27C47-L27C53
if ($app_name === 'onlyoffice') {
Method tryLogin
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tryLogin($user, $password, $redirect_url, $timezone = null, $remember_login = null) {
$originalUser = $user;
// TODO: Add all the insane error handling
$loginResult = $this->userSession->login($user, $password);
if ($loginResult !== true && $this->config->getSystemValue('strict_login_enforced', false) !== true) {
Method __construct
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appName,
IRequest $request,
IManager $shareManager,
IGroupManager $groupManager,
IUserManager $userManager,
Method __construct
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ILogger $logger,
IConfig $config,
ISecureRandom $secureRandom,
IHasher $hasher,
IMountManager $mountManager,
Function renderApp
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderApp: function(app, template, selector, firstExperimental) {
if (!template) {
var source = $("#app-template").html();
template = Handlebars.compile(source);
}
Function lazyLoadPreview
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lazyLoadPreview : function(options) {
var self = this;
var path = options.path;
var mime = options.mime;
var ready = options.callback;