Showing 4,504 of 4,504 total issues
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($options) {
$this->memcacheFactory = \OC::$server->getMemCacheFactory();
$this->httpClient = \OC::$server->getHTTPClientService();
$this->logger = \OC::$server->getLogger();
$this->config = \OC::$server->getConfig();
Method changePersonalPassword
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function changePersonalPassword($args) {
// Check if we are an user
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
Method syncThemAll
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function syncThemAll(\Closure $callback) {
$trustedServers = $this->dbHandler->getAllServer();
foreach ($trustedServers as $trustedServer) {
$url = $trustedServer['url'];
$callback($url, null);
Method run
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run($argument) {
//Current time
$today = new \DateTime("today");
$today = $today->format('Y-m-d H:i:s');
Method copy_recursive
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function copy_recursive($source, $destination, View $view) {
$size = 0;
if ($view->is_dir($source)) {
$view->mkdir($destination);
$view->touch($destination, $view->filemtime($source));
Method getDavPermissions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getDavPermissions() {
$p = '';
if ($this->info->isShared()) {
$p .= 'S';
}
Method getAccepted
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAccepted($remote, $shareWith) {
$event = $this->eventDispatcher->dispatch(
new GenericEvent('', ['remote' => $remote]),
'remoteshare.received'
);
Method lock
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function lock($uri, Locks\LockInfo $lockInfo) {
if ($this->isPublicEndpoint) {
throw new Forbidden('Forbidden to lock from public endpoint');
}
try {
Method setName
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setName($name) {
$mountPoint = $this->info->getMountPoint();
// rename of a shared mount should always be possible
if (!($mountPoint instanceof SharedMount) && !$this->info->isUpdateable()) {
throw new \Sabre\DAV\Exception\Forbidden();
Method updateCalendar
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateCalendar($calendarId, PropPatch $propPatch) {
$supportedProperties = \array_keys($this->propertyMap);
$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
$propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) {
Method syncRemoteAddressBook
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function syncRemoteAddressBook($url, $userName, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetProperties) {
// 1. create addressbook
$book = $this->ensureSystemAddressBookExists($targetPrincipal, $targetBookId, $targetProperties);
$addressBookId = $book['id'];
Method updateAddressBook
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) {
$supportedProperties = [
'{DAV:}displayname',
'{' . Plugin::NS_CARDDAV . '}addressbook-description',
];
Method deleteCard
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deleteCard($addressBookId, $cardUri) {
try {
$cardId = $this->getCardId($addressBookId, $cardUri);
} catch (\InvalidArgumentException $e) {
$cardId = null;
Method delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function delete($path) {
$deletedFile = self::$deletedFiles[$path];
$uid = $deletedFile['uid'];
$filename = $deletedFile['filename'];
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(array $urlParams = []) {
parent::__construct('files_versions', $urlParams);
$container = $this->getContainer();
Method adjustShareOwner
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function adjustShareOwner($shareId, $shareType, $newUidOwner) {
$query = $this->connection->getQueryBuilder();
$query->update('share')
->set('uid_owner', $query->createParameter('uid_owner'))
Method userScan
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function userScan($users, $inputPath, $shouldRepairStoragesIndividually, $input, $output, $verbose) {
$users_total = \count($users);
$user_count = 0;
foreach ($users as $user) {
if (\is_object($user)) {
Method checkConfig
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function checkConfig() {
$l = \OC::$server->getL10N('lib');
// Create config if it does not already exist
$configFilePath = self::$configDir .'/config.php';
Method getAllTags
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAllTags($visibilityFilter = null, $nameSearchPattern = null) {
$tags = [];
$query = $this->connection->getQueryBuilder();
$query->select('*')
Method getCacheEntry
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getCacheEntry($storage, $internalPath, $relativePath) {
$cache = $storage->getCache($internalPath);
$data = $cache->get($internalPath);
$watcher = $storage->getWatcher($internalPath);