Showing 3,235 of 4,504 total issues
Method rename
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function rename($path1, $path2) {
$file = $this->getDriveFile($path1);
if ($file) {
$newFile = $this->getDriveFile($path2);
$toUpdate = new DriveFile();
Method doFind
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doFind($script) {
$fullScript = $this->addExtension($script);
$themeDirectory = $this->theme->getDirectory();
$baseDirectory = $this->theme->getBaseDirectory();
$webRoot = '';
Method file_put_contents
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function file_put_contents($path, $data) {
return $this->emittingCall(function () use (&$path, &$data) {
if (\is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
if (Filesystem::isValidPath($path)
Method update
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update($id, array $data) {
unset(self::$path_cache[(int)$id]);
if (isset($data['path'])) {
// normalize path
$data['path'] = $this->normalize($data['path']);
Method scan
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function scan($dir = '') {
if (!Filesystem::isValidPath($dir)) {
throw new \InvalidArgumentException('Invalid path to scan');
}
$mounts = $this->getMounts($dir);
Method fopen
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fopen($path, $mode) {
$path = $this->normalizePath($path);
switch ($mode) {
case 'r':
Method getMountsForUser
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMountsForUser(IUser $user, IStorageFactory $loader) {
$mounts = [];
// setUser is in UserTrait.
/* @phan-suppress-next-line PhanUndeclaredMethod */
Method handleChildren
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) {
// we put this in it's own function so it cleans up the memory before we start recursing
$existingChildren = $this->getExistingChildren($folderId);
$newChildren = $this->getNewChildren($path);
Method centerCrop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function centerCrop($size = 0) {
if (!$this->valid()) {
$this->logger->error('OC_Image->centerCrop, No image loaded', ['app' => 'core']);
return false;
}
Method syncMultipleUsers
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function syncMultipleUsers(
InputInterface $input,
OutputInterface $output,
SyncService $syncService,
UserInterface $backend,
Function _onClickDeleteSelected
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onClickDeleteSelected: function(event) {
event.preventDefault();
var self = this;
var allFiles = this.$el.find('.select-all').is(':checked');
var files = [];
Function send
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function (data) {
if (data && !this.options.disabled) {
if (data.fileInput && !data.files) {
var that = this,
dfd = $.Deferred(),
Function _nextPage
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_nextPage: function(animate) {
var index = this.$fileList.children().length,
count = this.pageSize(),
hidden,
tr,
Function show
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
show: function() {
var self = this;
var title = t('core', 'Edit link share: {name}', {name: this.itemModel.getFileInfo().getFullPath()});
var buttons = [{
text: t('core', 'Cancel'),
Function _fillFilePicker
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_fillFilePicker:function(dir) {
var dirs = [];
var others = [];
var self = this;
this.$filelist.empty().addClass('icon-loading');
Function prompt
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
prompt: function (text, title, callback, modal, name, password, buttonDeclineText, buttonConfirmText) {
return $.when(this._getMessageTemplate()).then(function ($tmpl) {
var dialogName = 'oc-dialog-' + OCdialogs.dialogsCounter + '-content';
var dialogId = '#' + dialogName;
var $dlg = $tmpl.octemplate({
Method tryHttpPostToShareEndpoint
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $useOcm = false) {
$client = $this->httpClientService->newClient();
$protocol = 'https://';
$result = [
'success' => false,
Method getPublicCalendar
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPublicCalendar($uri) {
$fields = \array_values($this->propertyMap);
$fields[] = 'a.id';
$fields[] = 'a.uri';
$fields[] = 'a.synctoken';
Method updateProperties
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateProperties($path, INode $node, $changedProperties) {
$existingProperties = $this->getProperties($path, $node, []);
'@phan-var \OCA\DAV\Connector\Sabre\Node $node';
$fileId = $node->getId();
Method __construct
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(array $urlParams= []) {
parent::__construct('files', $urlParams);
$container = $this->getContainer();
$server = $container->getServer();