mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #22212 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
This commit is contained in:
commit
1a2d72b0ac
7 changed files with 28 additions and 18 deletions
|
|
@ -91,5 +91,8 @@ abstract class AbstractDatabase {
|
|||
$this->tablePrefix = $dbTablePrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $userName
|
||||
*/
|
||||
abstract public function setupDatabase($userName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class MySQL extends AbstractDatabase {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param IDbConnection $connection
|
||||
* @param IDBConnection $connection
|
||||
* @throws \OC\DatabaseSetupException
|
||||
*/
|
||||
private function createDBUser($connection) {
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class Helper extends \OC\Share\Constants {
|
|||
*
|
||||
* all return: http://localhost
|
||||
*
|
||||
* @param string $shareWith
|
||||
* @param string $remote
|
||||
* @return string
|
||||
*/
|
||||
protected static function fixRemoteURL($remote) {
|
||||
|
|
@ -244,7 +244,7 @@ class Helper extends \OC\Share\Constants {
|
|||
* split user and remote from federated cloud id
|
||||
*
|
||||
* @param string $id
|
||||
* @return array
|
||||
* @return string[]
|
||||
* @throws HintException
|
||||
*/
|
||||
public static function splitUserRemote($id) {
|
||||
|
|
|
|||
|
|
@ -2297,6 +2297,16 @@ class Share extends Constants {
|
|||
return $id ? $id : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $itemType
|
||||
* @param string $itemSource
|
||||
* @param int $shareType
|
||||
* @param string $shareWith
|
||||
* @param string $uidOwner
|
||||
* @param int $permissions
|
||||
* @param string|null $itemSourceName
|
||||
* @param null|\DateTime $expirationDate
|
||||
*/
|
||||
private static function checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate) {
|
||||
$backend = self::getBackend($itemType);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,23 +53,19 @@ class OC_Template extends \OC\Template\Base {
|
|||
/** @var string */
|
||||
protected $app; // app id
|
||||
|
||||
protected static $initTemplateEngineFirstRun = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $app app providing the template
|
||||
* @param string $name of the template file (without suffix)
|
||||
* @param string $renderAs = ""; produce a full page
|
||||
* @param string $renderAs If $renderAs is set, OC_Template will try to
|
||||
* produce a full page in the according layout. For
|
||||
* now, $renderAs can be set to "guest", "user" or
|
||||
* "admin".
|
||||
* @param bool $registerCall = true
|
||||
* @return OC_Template object
|
||||
*
|
||||
* This function creates an OC_Template object.
|
||||
*
|
||||
* If $renderAs is set, OC_Template will try to produce a full page in the
|
||||
* according layout. For now, $renderAs can be set to "guest", "user" or
|
||||
* "admin".
|
||||
*/
|
||||
|
||||
protected static $initTemplateEngineFirstRun = true;
|
||||
|
||||
public function __construct( $app, $name, $renderAs = "", $registerCall = true ) {
|
||||
// Read the selected theme from the config file
|
||||
self::initTemplateEngine($renderAs);
|
||||
|
|
@ -92,6 +88,9 @@ class OC_Template extends \OC\Template\Base {
|
|||
parent::__construct($template, $requestToken, $l10n, $themeDefaults);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $renderAs
|
||||
*/
|
||||
public static function initTemplateEngine($renderAs) {
|
||||
if (self::$initTemplateEngineFirstRun){
|
||||
|
||||
|
|
@ -182,7 +181,7 @@ class OC_Template extends \OC\Template\Base {
|
|||
* Checking all the possible locations.
|
||||
* @param string $theme
|
||||
* @param string $app
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
protected function findTemplate($theme, $app, $name) {
|
||||
// Check if it is a app template or not.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ namespace OC;
|
|||
|
||||
use OC\Hooks\BasicEmitter;
|
||||
use OC\IntegrityCheck\Checker;
|
||||
use OC\IntegrityCheck\Storage;
|
||||
use OC_App;
|
||||
use OC_Installer;
|
||||
use OC_Util;
|
||||
|
|
@ -287,7 +286,6 @@ class Updater extends BasicEmitter {
|
|||
* @param string $installedVersion previous version from which to upgrade from
|
||||
*
|
||||
* @throws \Exception
|
||||
* @return bool true if the operation succeeded, false otherwise
|
||||
*/
|
||||
private function doUpgrade($currentVersion, $installedVersion) {
|
||||
// Stop update if the update is over several major versions
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ class OC_User {
|
|||
* Sets user display name for session
|
||||
*
|
||||
* @param string $uid
|
||||
* @param null $displayName
|
||||
* @param string $displayName
|
||||
* @return bool Whether the display name could get set
|
||||
*/
|
||||
public static function setDisplayName($uid, $displayName = null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue