Showing 4,504 of 4,504 total issues
Function initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function() {
Files.bindKeyboardShortcuts(document, $);
// TODO: move file list related code (upload) to OCA.Files.FileList
$('#file_action_panel').attr('activeAction', false);
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function() {
var templateVars = {
closeLabel: t('files', 'Close')
};
Function setFilter
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setFilter:function(filter) {
var total = 0;
if (this._filter === filter) {
return;
}
Function reload
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
reload: function() {
this._selectedFiles = {};
this._selectionSummary.clear();
if (this._currentFileModel) {
this._currentFileModel.off();
Function unlock
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
unlock: function(path, token, options) {
if (!path) {
throw 'Missing argument "path"';
}
if (!token) {
Method splitUserRemote
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function splitUserRemote($address) {
if (\strpos($address, '@') === false) {
throw new \Exception('Invalid Federated Cloud ID');
}
Method sendRemoteShare
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendRemoteShare(
Address $shareWithAddress,
Address $ownerAddress,
Address $sharedByAddress,
$token,
Method getSharePermissions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSharePermissions($user) {
// check of we access a federated share
if ($user !== null) {
try {
$share = $this->shareManager->getShareByToken($user);
Method getACL
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getACL() {
$acl = [
[
'privilege' => '{DAV:}all',
'principal' => '{DAV:}owner',
Method getSearchResultIterator
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getSearchResultIterator($filesUri, $searchResults, $requestedProps, $maxResults) {
$paths = [];
foreach ($searchResults as $searchResult) {
$paths[$filesUri . $searchResult->path] = $searchResult;
}
Method httpPost
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath();
// Only handling xml
$contentType = $request->getHeader('Content-Type');
Method registerHooks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerHooks() {
/** @var HookManager $hm */
$hm = $this->getContainer()->query(HookManager::class);
$hm->setup();
Method vCard2Array
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function vCard2Array($uri, VCard $vCard) {
$result = [
'URI' => $uri,
];
Method getPhoto
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPhoto(Card $node) {
// TODO: this is kind of expensive - load carddav data from database and parse it
// we might want to build up a cache one day
try {
$vObject = $this->readCard($node->get());
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($params) {
// extract context path from host if specified
// (owncloud install path on host)
$host = $params['host'];
// strip protocol
Method restoreShares
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function restoreShares(OutputInterface $output) {
$output->writeln("Restoring shares ...");
$progress = new ProgressBar($output, \count($this->shares));
$status = 0;
Method touch
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function touch($path, $mtime = null) {
$file = $this->getDriveFile($path);
$toUpdate = new DriveFile();
$result = false;
if ($file) {
Method fopen
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fopen($path, $mode) {
$hooks = [];
switch ($mode) {
case 'r':
case 'rb':
Method getMultiBucketObjectStoreConfig
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getMultiBucketObjectStoreConfig(IUser $user) {
$config = $this->config->getSystemValue('objectstore_multibucket');
if (!\is_array($config)) {
return null;
}
Method jsonSerialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function jsonSerialize() {
$result = [];
if ($this->id !== null) {
$result['id'] = $this->id;
}