Showing 4,504 of 4,504 total issues
Method getSharesFromItem
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSharesFromItem($target) {
$result = [];
$owner = Filesystem::getOwner($target);
Filesystem::initMountPoints($owner);
$info = Filesystem::getFileInfo($target);
Method expireTrash
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function expireTrash(string $uid) {
$trashBinSize = Trashbin::getTrashbinSize($uid);
$availableSpace = $this->quota->calculateFreeSpace($trashBinSize, $uid);
// delete all files older then $retention_obligation
Method registerHooks
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerHooks() {
$container = $this->getContainer();
$hooksManager = new Hooks($container->query('TrustedServers'));
Util::connectHook(
Method convertToOcmFileNotification
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function convertToOcmFileNotification($remoteId, $token, $action, $data = []) {
$notification = new FileNotification();
$map = [
'accept' => FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED,
'decline' => FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED,
Method getSubscriptionsForUser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSubscriptionsForUser($principalUri) {
$fields = \array_values($this->subscriptionPropertyMap);
$fields[] = 'id';
$fields[] = 'uri';
$fields[] = 'source';
Method createAddressbookChangesTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createAddressbookChangesTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}addressbookchanges")) {
$table = $schema->createTable("{$this->prefix}addressbookchanges");
$table->addColumn('id', 'integer', [
'autoincrement' => true,
Method createCalendarChangesTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createCalendarChangesTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}calendarchanges")) {
$table = $schema->createTable("{$this->prefix}calendarchanges");
$table->addColumn('id', 'integer', [
'autoincrement' => true,
Method stream_read
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stream_read($count) {
$node = null;
$lastNode = null;
do {
if ($this->currentStream === null) {
Method update
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(
$id,
$backendOptions,
$testOnly = true
) {
Method updateProperties
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateProperties($addressBookId, $cardUri, $vCardSerialized) {
$cardId = $this->getCardId($addressBookId, $cardUri);
$vCard = $this->readCard($vCardSerialized);
$this->purgeProperties($addressBookId, $cardId);
Method copy
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function copy($sourcePath, $destinationPath) {
$sourceNode = $this->getNodeForPath($sourcePath);
if ($sourceNode instanceof File
|| $sourceNode instanceof Directory
) {
Method __construct
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($params) {
// log switch might be set already (from a subclass), so don't change it.
if (!isset($this->logActive)) {
$this->logActive = \OC::$server->getConfig()->getSystemValue('smb.logging.enable', false) === true;
}
Method update
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(Entity $entity) {
// if entity wasn't changed it makes no sense to run a db query
$properties = $entity->getUpdatedFields();
if (\count($properties) === 0) {
return $entity;
Method getStatusInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getStatusInfo($includeVersion = false, $serverHide = false, $hostnameShort = false) {
$systemConfig = \OC::$server->getSystemConfig();
$installed = (bool) $systemConfig->getValue('installed', false);
$maintenance = (bool) $systemConfig->getValue('maintenance', false);
Method getBuiltInPanels
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getBuiltInPanels($type) {
if ($type === 'admin') {
return [
Enforce2fa::class,
LegacyAdmin::class,
Method runHooks
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function runHooks($hooks, $path, $post = false) {
if (empty($hooks)) {
return true;
}
$relativePath = $path;
Method stream_write
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stream_write($data) {
$length = 0;
// loop over $data to fit it in 6126 sized unencrypted blocks
while (isset($data[0])) {
$remainingLength = \strlen($data);
Method detect
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function detect($path) {
$this->loadMappings();
if (@\is_dir($path)) {
// directories are easy
Method commitBatch
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function commitBatch() {
if (!$this->inBatch) {
throw new \BadMethodCallException('Not in batch');
}
$this->inBatch = false;
Method makeTheme
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function makeTheme($themeName, $appTheme = true) {
$serverRoot = $this->environmentHelper->getServerRoot();
$baseDirectory = $serverRoot;
$directory = '';
$webPath = '';