Showing 3,235 of 4,504 total issues
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;
}
Method getAllNonUTF8BinTables
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllNonUTF8BinTables(IDBConnection $connection) {
$dbPrefix = $this->config->getSystemValue("dbtableprefix");
$dbName = $this->config->getSystemValue("dbname");
$characterSet = $this->config->getSystemValue('mysql.utf8mb4', false) ? 'utf8mb4' : 'utf8';
Method scale
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function scale($image, $askedWidth, $askedHeight, $previewWidth, $previewHeight) {
$scalingUp = $this->getScalingUp();
$maxScaleFactor = $this->getMaxScaleFactor();
$factorX = $askedWidth / $previewWidth;
Method getRawPathInfo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRawPathInfo() {
$requestUri = $this->server['REQUEST_URI'] ?? '';
// remove too many leading slashes - can be caused by reverse proxy configuration
if (\strpos($requestUri, '/') === 0) {
$requestUri = '/' . \ltrim($requestUri, '/');
Method processResources
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processResources($routes) {
// declaration of all restful actions
$actions = [
['name' => 'index', 'verb' => 'GET', 'on-collection' => true],
['name' => 'show', 'verb' => 'GET'],
Method decrypt
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function decrypt($authenticatedCiphertext, $password = '') {
if ($password === '') {
$password = $this->config->getSystemValue('secret');
}
Method signedRequestIsValid
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function signedRequestIsValid(): bool {
$params = $this->getQueryParameters();
if (!isset($params['OC-Signature'], $params['OC-Credential'], $params['OC-Date'], $params['OC-Expires'], $params['OC-Verb'])) {
$q = \json_encode($params);
\OC::$server->getLogger()->debug("Query parameters are missing: $q", ['app' => 'signed-url']);
Method printExceptionErrorPage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function printExceptionErrorPage($exception, $fetchPage = false) {
try {
$trace = Log::replaceSensitiveData($exception->getTraceAsString());
$request = \OC::$server->getRequest();
Method callForUsers
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function callForUsers($callback, $search, $onlySeen, $limit = null, $offset = null) {
$qb = $this->db->getQueryBuilder();
$qb->select(['*'])
->from($this->getTableName());
Method setLanguageFromRequest
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setLanguageFromRequest($app = null) {
$header = $this->request->getHeader('ACCEPT_LANGUAGE');
if ($header) {
$available = $this->findAvailableLanguages($app);
Method findLanguage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function findLanguage($app = null) {
if ($this->requestLanguage !== '' && $this->languageExists($app, $this->requestLanguage)) {
return $this->requestLanguage;
}
Method configure
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function configure() {
parent::configure();
$this
->setName('config:system:set')
Function share
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
share:function(itemType, itemSource, shareType, shareWith, permissions, itemSourceName, expirationDate, callback, errorCallback) {
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $appName,
IRequest $request,
MailNotifications $mailNotifications,
IUserSession $userSession,
IUserManager $userManager,