diff options
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_DB.php | 8 | ||||
-rw-r--r-- | lib/private/legacy/OC_DB_StatementWrapper.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_Files.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_Hook.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_Response.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_Template.php | 12 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/template/functions.php | 14 |
8 files changed, 22 insertions, 22 deletions
diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php index 34cc39f26aa..edcac8f9071 100644 --- a/lib/private/legacy/OC_DB.php +++ b/lib/private/legacy/OC_DB.php @@ -58,7 +58,7 @@ class OC_DB { * * SQL query via Doctrine prepare(), needs to be execute()'d! */ - static public function prepare( $query , $limit = null, $offset = null, $isManipulation = null) { + static public function prepare($query , $limit = null, $offset = null, $isManipulation = null) { $connection = \OC::$server->getDatabaseConnection(); if ($isManipulation === null) { @@ -84,7 +84,7 @@ class OC_DB { * @param string $sql * @return bool */ - static public function isManipulation( $sql ) { + static public function isManipulation($sql) { $selectOccurrence = stripos($sql, 'SELECT'); if ($selectOccurrence !== false && $selectOccurrence < 10) { return false; @@ -113,7 +113,7 @@ class OC_DB { * @return OC_DB_StatementWrapper * @throws \OC\DatabaseException */ - static public function executeAudited( $stmt, array $parameters = []) { + static public function executeAudited($stmt, array $parameters = []) { if (is_string($stmt)) { // convert to an array with 'sql' if (stripos($stmt, 'LIMIT') !== false) { //OFFSET requires LIMIT, so we only need to check for LIMIT @@ -172,7 +172,7 @@ class OC_DB { * * TODO: write more documentation */ - public static function createDbFromStructure( $file ) { + public static function createDbFromStructure($file) { $schemaManager = self::getMDB2SchemaManager(); return $schemaManager->createDbFromStructure($file); } diff --git a/lib/private/legacy/OC_DB_StatementWrapper.php b/lib/private/legacy/OC_DB_StatementWrapper.php index 872e8f64e79..d4072caf28e 100644 --- a/lib/private/legacy/OC_DB_StatementWrapper.php +++ b/lib/private/legacy/OC_DB_StatementWrapper.php @@ -114,7 +114,7 @@ class OC_DB_StatementWrapper { * @param integer|null $length max length when using an OUT bind * @return boolean */ - public function bindParam($column, &$variable, $type = null, $length = null){ + public function bindParam($column, &$variable, $type = null, $length = null) { return $this->statement->bindParam($column, $variable, $type, $length); } } diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index 72983f50d9c..710e0882010 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -399,7 +399,7 @@ class OC_Files { $view->lockFile($file, ILockingProvider::LOCK_SHARED); if ($view->is_dir($file)) { $contents = $view->getDirectoryContent($file); - $contents = array_map(function($fileInfo) use ($file) { + $contents = array_map(function ($fileInfo) use ($file) { /** @var \OCP\Files\FileInfo $fileInfo */ return $file . '/' . $fileInfo->getName(); }, $contents); diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index 3cc29a58c77..d7b1e414a00 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -51,7 +51,7 @@ class OC_Hook { * * TODO: write example */ - static public function connect($signalClass, $signalName, $slotClass, $slotName ) { + static public function connect($signalClass, $signalName, $slotClass, $slotName) { // If we're trying to connect to an emitting class that isn't // yet registered, register it if( !array_key_exists($signalClass, self::$registered )) { diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php index 4eb454d3181..d30f56ca1ba 100644 --- a/lib/private/legacy/OC_Response.php +++ b/lib/private/legacy/OC_Response.php @@ -33,7 +33,7 @@ class OC_Response { * @param string $filename file name * @param string $type disposition type, either 'attachment' or 'inline' */ - static public function setContentDispositionHeader( $filename, $type = 'attachment' ) { + static public function setContentDispositionHeader($filename, $type = 'attachment') { if (\OC::$server->getRequest()->isUserAgent( [ \OC\AppFramework\Http\Request::USER_AGENT_IE, diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php index 279ceb8de0f..99ad53fa08a 100644 --- a/lib/private/legacy/OC_Template.php +++ b/lib/private/legacy/OC_Template.php @@ -72,7 +72,7 @@ class OC_Template extends \OC\Template\Base { * "admin". * @param bool $registerCall = true */ - public function __construct( $app, $name, $renderAs = "", $registerCall = true ) { + public function __construct($app, $name, $renderAs = "", $registerCall = true) { // Read the selected theme from the config file self::initTemplateEngine($renderAs); @@ -227,7 +227,7 @@ class OC_Template extends \OC\Template\Base { * Includes another template. use <?php echo $this->inc('template'); ?> to * do this. */ - public function inc( $file, $additionalParams = null ) { + public function inc($file, $additionalParams = null) { return $this->load($this->path.$file.'.php', $additionalParams); } @@ -238,7 +238,7 @@ class OC_Template extends \OC\Template\Base { * @param array $parameters Parameters for the template * @return boolean|null */ - public static function printUserPage( $application, $name, $parameters = [] ) { + public static function printUserPage($application, $name, $parameters = []) { $content = new OC_Template( $application, $name, "user" ); foreach( $parameters as $key => $value ) { $content->assign( $key, $value ); @@ -253,7 +253,7 @@ class OC_Template extends \OC\Template\Base { * @param array $parameters Parameters for the template * @return bool */ - public static function printAdminPage( $application, $name, $parameters = [] ) { + public static function printAdminPage($application, $name, $parameters = []) { $content = new OC_Template( $application, $name, "admin" ); foreach( $parameters as $key => $value ) { $content->assign( $key, $value ); @@ -268,7 +268,7 @@ class OC_Template extends \OC\Template\Base { * @param array|string $parameters Parameters for the template * @return bool */ - public static function printGuestPage( $application, $name, $parameters = [] ) { + public static function printGuestPage($application, $name, $parameters = []) { $content = new OC_Template($application, $name, $name === 'error' ? $name : 'guest'); foreach( $parameters as $key => $value ) { $content->assign( $key, $value ); @@ -283,7 +283,7 @@ class OC_Template extends \OC\Template\Base { * @param int $statusCode * @suppress PhanAccessMethodInternal */ - public static function printErrorPage( $error_msg, $hint = '', $statusCode = 500) { + public static function printErrorPage($error_msg, $hint = '', $statusCode = 500) { if (\OC::$server->getAppManager()->isEnabledForUser('theming') && !\OC_App::isAppLoaded('theming')) { \OC_App::loadApp('theming'); } diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index f14095675dc..5d2f8b8370e 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -1163,7 +1163,7 @@ class OC_Util { */ public static function sanitizeHTML($value) { if (is_array($value)) { - $value = array_map(function($value) { + $value = array_map(function ($value) { return self::sanitizeHTML($value); }, $value); } else { diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 44fa9e52dd2..f427642b619 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -214,7 +214,7 @@ function component($app, $file) { * * For further information have a look at \OCP\IURLGenerator::linkTo */ -function link_to( $app, $file, $args = [] ) { +function link_to($app, $file, $args = []) { return \OC::$server->getURLGenerator()->linkTo($app, $file, $args); } @@ -234,7 +234,7 @@ function link_to_docs($key) { * * For further information have a look at \OCP\IURLGenerator::imagePath */ -function image_path( $app, $image ) { +function image_path($app, $image) { return \OC::$server->getURLGenerator()->imagePath( $app, $image ); } @@ -243,7 +243,7 @@ function image_path( $app, $image ) { * @param string $mimetype mimetype * @return string link to the image */ -function mimetype_icon( $mimetype ) { +function mimetype_icon($mimetype) { return \OC::$server->getMimeTypeDetector()->mimeTypeIcon( $mimetype ); } @@ -253,7 +253,7 @@ function mimetype_icon( $mimetype ) { * @param string $path path of file * @return string link to the preview */ -function preview_icon( $path ) { +function preview_icon($path) { return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]); } @@ -262,7 +262,7 @@ function preview_icon( $path ) { * @param string $token * @return string */ -function publicPreview_icon ( $path, $token ) { +function publicPreview_icon($path, $token) { return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 'token' => $token]); } @@ -273,7 +273,7 @@ function publicPreview_icon ( $path, $token ) { * * For further information have a look at OC_Helper::humanFileSize */ -function human_file_size( $bytes ) { +function human_file_size($bytes) { return OC_Helper::humanFileSize( $bytes ); } @@ -282,7 +282,7 @@ function human_file_size( $bytes ) { * @param int $timestamp UNIX timestamp to strip * @return int timestamp without time value */ -function strip_time($timestamp){ +function strip_time($timestamp) { $date = new \DateTime("@{$timestamp}"); $date->setTime(0, 0, 0); return (int)$date->format('U'); |