From adaee6a5a19a4b0050d189736bd4e6183fee9cf0 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Wed, 19 Feb 2014 09:31:54 +0100 Subject: Scrutinizer Auto-Fixes This patch was automatically generated as part of the following inspection: https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720 Enabled analysis tools: - PHP Analyzer - JSHint - PHP Copy/Paste Detector - PHP PDepend --- lib/private/app.php | 2 ++ lib/private/appconfig.php | 7 ++++-- lib/private/appframework/app.php | 1 - .../dependencyinjection/dicontainer.php | 1 - lib/private/appframework/http/redirectresponse.php | 4 ++-- .../middleware/middlewaredispatcher.php | 1 - .../middleware/security/securitymiddleware.php | 2 +- lib/private/archive.php | 1 - lib/private/archive/tar.php | 6 +++++ lib/private/archive/zip.php | 4 +++- lib/private/arrayparser.php | 3 +++ lib/private/backgroundjob.php | 2 +- lib/private/backgroundjob/joblist.php | 2 +- lib/private/cache/usercache.php | 2 +- lib/private/config.php | 4 ++-- .../sabre/aborteduploaddetectionplugin.php | 2 +- lib/private/connector/sabre/quotaplugin.php | 1 + lib/private/db.php | 3 ++- lib/private/db/mdb2schemawriter.php | 6 +++++ lib/private/filechunking.php | 2 +- lib/private/fileproxy.php | 1 + lib/private/files.php | 3 +++ lib/private/files/cache/updater.php | 2 -- lib/private/files/fileinfo.php | 4 ++++ lib/private/files/filesystem.php | 3 +++ lib/private/files/node/folder.php | 1 - lib/private/files/node/node.php | 2 -- lib/private/files/node/root.php | 1 - lib/private/files/storage/loader.php | 3 +++ lib/private/files/storage/mappedlocal.php | 6 +++++ lib/private/files/utils/scanner.php | 3 +++ lib/private/geo.php | 4 ++++ lib/private/group.php | 2 +- lib/private/group/dummy.php | 2 +- lib/private/image.php | 9 ++++---- lib/private/installer.php | 27 +--------------------- lib/private/l10n.php | 3 +++ lib/private/legacy/appconfig.php | 2 ++ lib/private/legacy/preferences.php | 2 +- lib/private/migrate.php | 3 ++- lib/private/migration/content.php | 8 +++---- lib/private/migration/provider.php | 2 +- lib/private/ocs.php | 5 +--- lib/private/preferences.php | 2 +- lib/private/request.php | 2 +- lib/private/share/searchresultsorter.php | 4 ++-- lib/private/template/base.php | 4 ++++ lib/private/template/templatefilelocator.php | 1 + lib/private/user.php | 2 ++ lib/private/user/database.php | 2 +- lib/private/util.php | 5 ++-- 51 files changed, 102 insertions(+), 74 deletions(-) (limited to 'lib/private') diff --git a/lib/private/app.php b/lib/private/app.php index e60a8a4e0b1..47f983cce35 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -640,6 +640,8 @@ class OC_App{ /** * register an admin form to be shown + * @param string $app + * @param string $page */ public static function registerAdmin($app, $page) { self::$adminForms[]= $app.'/'.$page.'.php'; diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index a32c1126c7b..cdaaebb87e5 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -69,6 +69,9 @@ class AppConfig implements \OCP\IAppConfig { return $this->cache[$app]; } + /** + * @param string $app + */ private function getAppValues($app) { $appCache = $this->getAppCache($app); if (array_search($app, $this->appsLoaded) === false) { @@ -184,7 +187,7 @@ class AppConfig implements \OCP\IAppConfig { * @brief Deletes a key * @param string $app app * @param string $key key - * @return bool + * @return boolean|null */ public function deleteKey($app, $key) { $where = array( @@ -200,7 +203,7 @@ class AppConfig implements \OCP\IAppConfig { /** * @brief Remove app from appconfig * @param string $app app - * @return bool + * @return boolean|null * * Removes all keys in appconfig belonging to the app. */ diff --git a/lib/private/appframework/app.php b/lib/private/appframework/app.php index b835188661a..3b13194862d 100644 --- a/lib/private/appframework/app.php +++ b/lib/private/appframework/app.php @@ -25,7 +25,6 @@ namespace OC\AppFramework; use OC\AppFramework\DependencyInjection\DIContainer; -use OCP\AppFramework\IAppContainer; /** diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index b6ccf60db4b..4821ecaf67b 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -34,7 +34,6 @@ use OC\AppFramework\Utility\SimpleContainer; use OC\AppFramework\Utility\TimeFactory; use OCP\AppFramework\IApi; use OCP\AppFramework\IAppContainer; -use OCP\AppFramework\IMiddleWare; use OCP\AppFramework\Middleware; use OCP\IServerContainer; diff --git a/lib/private/appframework/http/redirectresponse.php b/lib/private/appframework/http/redirectresponse.php index 5c4e1c06dc3..05353349065 100644 --- a/lib/private/appframework/http/redirectresponse.php +++ b/lib/private/appframework/http/redirectresponse.php @@ -24,8 +24,8 @@ namespace OC\AppFramework\Http; -use OCP\AppFramework\Http\Response, - OCP\AppFramework\Http; +use OCP\AppFramework\Http\Response; +use OCP\AppFramework\Http; /** diff --git a/lib/private/appframework/middleware/middlewaredispatcher.php b/lib/private/appframework/middleware/middlewaredispatcher.php index 598743e523f..2a715598fc4 100644 --- a/lib/private/appframework/middleware/middlewaredispatcher.php +++ b/lib/private/appframework/middleware/middlewaredispatcher.php @@ -26,7 +26,6 @@ namespace OC\AppFramework\Middleware; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Response; -use OCP\AppFramework\MiddleWare; /** * This class is used to store and run all the middleware in correct order diff --git a/lib/private/appframework/middleware/security/securitymiddleware.php b/lib/private/appframework/middleware/security/securitymiddleware.php index c3143754823..bb02d565fa4 100644 --- a/lib/private/appframework/middleware/security/securitymiddleware.php +++ b/lib/private/appframework/middleware/security/securitymiddleware.php @@ -66,7 +66,7 @@ class SecurityMiddleware extends Middleware { * This runs all the security checks before a method call. The * security checks are determined by inspecting the controller method * annotations - * @param string/Controller $controller the controllername or string + * @param string $controller the controllername or string * @param string $methodName the name of the method * @throws SecurityException when a security check fails */ diff --git a/lib/private/archive.php b/lib/private/archive.php index a18f8d3ffbd..6f51066ddf8 100644 --- a/lib/private/archive.php +++ b/lib/private/archive.php @@ -88,7 +88,6 @@ abstract class OC_Archive{ abstract function extractFile($path, $dest); /** * extract the archive - * @param string $path * @param string $dest * @return bool */ diff --git a/lib/private/archive/tar.php b/lib/private/archive/tar.php index 5538e027ab4..cbdb565ba35 100644 --- a/lib/private/archive/tar.php +++ b/lib/private/archive/tar.php @@ -22,6 +22,9 @@ class OC_Archive_TAR extends OC_Archive{ private $tar=null; private $path; + /** + * @param string $source + */ function __construct($source) { $types=array(null, 'gz', 'bz'); $this->path=$source; @@ -122,6 +125,9 @@ class OC_Archive_TAR extends OC_Archive{ return true; } + /** + * @param string $file + */ private function getHeader($file) { if ( ! $this->cachedHeaders ) { $this->cachedHeaders = $this->tar->listContent(); diff --git a/lib/private/archive/zip.php b/lib/private/archive/zip.php index cd5479299a1..fa5630d7665 100644 --- a/lib/private/archive/zip.php +++ b/lib/private/archive/zip.php @@ -13,6 +13,9 @@ class OC_Archive_ZIP extends OC_Archive{ private $zip=null; private $path; + /** + * @param string $source + */ function __construct($source) { $this->path=$source; $this->zip=new ZipArchive(); @@ -125,7 +128,6 @@ class OC_Archive_ZIP extends OC_Archive{ } /** * extract the archive - * @param string $path * @param string $dest * @return bool */ diff --git a/lib/private/arrayparser.php b/lib/private/arrayparser.php index c4ad1264fbb..d353e486577 100644 --- a/lib/private/arrayparser.php +++ b/lib/private/arrayparser.php @@ -39,6 +39,9 @@ class ArrayParser { return $this->parse($string); } + /** + * @param string $string + */ function stripPHPTags($string) { $string = trim($string); if (substr($string, 0, 5) === 'addChild('name', $column->getName()); switch($column->getType()) { @@ -114,6 +117,9 @@ class OC_DB_MDB2SchemaWriter { } } + /** + * @param SimpleXMLElement $xml + */ private static function saveIndex($index, $xml) { $xml->addChild('name', $index->getName()); if ($index->isPrimary()) { diff --git a/lib/private/filechunking.php b/lib/private/filechunking.php index 09b30af48b2..be7f4e14a11 100644 --- a/lib/private/filechunking.php +++ b/lib/private/filechunking.php @@ -41,7 +41,7 @@ class OC_FileChunking { * Stores the given $data under the given $key - the number of stored bytes is returned * * @param string $index - * @param $data + * @param resource $data * @return int */ public function store($index, $data) { diff --git a/lib/private/fileproxy.php b/lib/private/fileproxy.php index 62187e1ec74..88976c1b8e5 100644 --- a/lib/private/fileproxy.php +++ b/lib/private/fileproxy.php @@ -110,6 +110,7 @@ class OC_FileProxy{ /** * @param string $operation + * @param string|boolean $path * * @return string */ diff --git a/lib/private/files.php b/lib/private/files.php index 4a6b9d8ca0e..6a6916537d4 100644 --- a/lib/private/files.php +++ b/lib/private/files.php @@ -32,6 +32,9 @@ class OC_Files { return \OC\Files\Filesystem::getFileInfo($path, $includeMountPoints); } + /** + * @param string $path + */ static public function getDirectoryContent($path){ return \OC\Files\Filesystem::getDirectoryContent($path); } diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index e4114e572fe..7a45b9e9e96 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -8,8 +8,6 @@ namespace OC\Files\Cache; -use OCP\Util; - /** * listen to filesystem hooks and change the cache accordingly */ diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php index c77571cd2a7..2dbdd80a26b 100644 --- a/lib/private/files/fileinfo.php +++ b/lib/private/files/fileinfo.php @@ -29,6 +29,10 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { */ private $internalPath; + /** + * @param string|boolean $path + * @param Storage\Storage $storage + */ public function __construct($path, $storage, $internalPath, $data) { $this->path = $path; $this->storage = $storage; diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index d1ebad3490c..0face6aa3bb 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -668,6 +668,9 @@ class Filesystem { return self::$defaultInstance->search($query); } + /** + * @param string $query + */ static public function searchByMime($query) { return self::$defaultInstance->searchByMime($query); } diff --git a/lib/private/files/node/folder.php b/lib/private/files/node/folder.php index 923f53821b2..d9e0ddc2d61 100644 --- a/lib/private/files/node/folder.php +++ b/lib/private/files/node/folder.php @@ -9,7 +9,6 @@ namespace OC\Files\Node; use OC\Files\Cache\Cache; -use OC\Files\Cache\Scanner; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; diff --git a/lib/private/files/node/node.php b/lib/private/files/node/node.php index 643a587dfc2..bc075911749 100644 --- a/lib/private/files/node/node.php +++ b/lib/private/files/node/node.php @@ -8,8 +8,6 @@ namespace OC\Files\Node; -use OC\Files\Cache\Cache; -use OC\Files\Cache\Scanner; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php index a22a2aaf4e9..70135285b0d 100644 --- a/lib/private/files/node/root.php +++ b/lib/private/files/node/root.php @@ -9,7 +9,6 @@ namespace OC\Files\Node; use OC\Files\Cache\Cache; -use OC\Files\Cache\Scanner; use OC\Files\Mount\Manager; use OC\Files\Mount\Mount; use OCP\Files\NotFoundException; diff --git a/lib/private/files/storage/loader.php b/lib/private/files/storage/loader.php index 734131261c8..966234cb04d 100644 --- a/lib/private/files/storage/loader.php +++ b/lib/private/files/storage/loader.php @@ -33,6 +33,9 @@ class Loader { return $this->wrap($mountPoint, new $class($arguments)); } + /** + * @param string|boolean $mountPoint + */ public function wrap($mountPoint, $storage) { foreach ($this->storageWrappers as $wrapper) { $storage = $wrapper($mountPoint, $storage); diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php index c8b22cfb39f..1bab3489a28 100644 --- a/lib/private/files/storage/mappedlocal.php +++ b/lib/private/files/storage/mappedlocal.php @@ -326,12 +326,18 @@ class MappedLocal extends \OC\Files\Storage\Common{ return $this->filemtime($path)>$time; } + /** + * @param string $path + */ private function buildPath($path, $create=true) { $path = $this->stripLeading($path); $fullPath = $this->datadir.$path; return $this->mapper->logicToPhysical($fullPath, $create); } + /** + * @param string $path + */ private function cleanMapper($path, $isLogicPath=true, $recursive=true) { $fullPath = $path; if ($isLogicPath) { diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index 558bc60cf06..a802a8fcb8b 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -69,6 +69,9 @@ class Scanner extends PublicEmitter { }); } + /** + * @param string $dir + */ public function backgroundScan($dir) { $mounts = $this->getMounts($dir); foreach ($mounts as $mount) { diff --git a/lib/private/geo.php b/lib/private/geo.php index ed01ad0b616..7094d885af6 100644 --- a/lib/private/geo.php +++ b/lib/private/geo.php @@ -12,6 +12,10 @@ class OC_Geo{ * @param (string) $longitude - Longitude * @return (string) $timezone - closest timezone */ + /** + * @param integer $latitude + * @param integer $longitude + */ public static function timezone($latitude, $longitude) { $alltimezones = DateTimeZone::listIdentifiers(); $variances = array(); diff --git a/lib/private/group.php b/lib/private/group.php index 444788c97f1..4c187b538af 100644 --- a/lib/private/group.php +++ b/lib/private/group.php @@ -243,7 +243,7 @@ class OC_Group { /** * @brief get a list of all users in several groups - * @param array $gids + * @param string[] $gids * @param string $search * @param int $limit * @param int $offset diff --git a/lib/private/group/dummy.php b/lib/private/group/dummy.php index 9516fd52ff8..da26e1b910e 100644 --- a/lib/private/group/dummy.php +++ b/lib/private/group/dummy.php @@ -28,7 +28,7 @@ class OC_Group_Dummy extends OC_Group_Backend { private $groups=array(); /** * @brief Try to create a new group - * @param $gid The name of the group to create + * @param string $gid The name of the group to create * @returns true/false * * Trys to create a new group. If the group name already exists, false will diff --git a/lib/private/image.php b/lib/private/image.php index 42afa35ea56..42685ddab5c 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -34,7 +34,7 @@ class OC_Image { /** * @brief Get mime type for an image file. - * @param $filepath The path to a local image file. + * @param string|null $filepath The path to a local image file. * @returns string The mime type if the it could be determined, otherwise an empty string. */ static public function getMimeTypeForFile($filePath) { @@ -163,6 +163,7 @@ class OC_Image { /** * @brief Saves the image. * @returns bool + * @param string $filePath */ public function save($filePath=null) { @@ -704,7 +705,7 @@ class OC_Image { /** * @brief Resizes the image preserving ratio. - * @param integer $maxsize The maximum size of either the width or height. + * @param integer $maxSize The maximum size of either the width or height. * @returns bool */ public function resize($maxSize) { @@ -852,8 +853,8 @@ class OC_Image { /** * @brief Resizes the image to fit within a boundry while preserving ratio. - * @param $maxWidth - * @param $maxHeight + * @param integer $maxWidth + * @param integer $maxHeight * @returns bool */ public function fitIn($maxWidth, $maxHeight) { diff --git a/lib/private/installer.php b/lib/private/installer.php index 1b974c6e5a5..fe7417990c8 100644 --- a/lib/private/installer.php +++ b/lib/private/installer.php @@ -236,30 +236,6 @@ class OC_Installer{ /** * @brief Update an application - * @param array $data with all information - * - * This function installs an app. All information needed are passed in the - * associative array $data. - * The following keys are required: - * - source: string, can be "path" or "http" - * - * One of the following keys is required: - * - path: path to the file containing the app - * - href: link to the downloadable file containing the app - * - * The following keys are optional: - * - pretend: boolean, if set true the system won't do anything - * - noupgrade: boolean, if true appinfo/upgrade.php won't be loaded - * - * This function works as follows - * -# fetching the file - * -# removing the old files - * -# unzipping new file - * -# including appinfo/upgrade.php - * -# setting the installed version - * - * upgrade.php can determine the current installed version of the app using - * "OC_Appconfig::getValue($appid, 'installed_version')" */ public static function updateApp( $app ) { $ocsid=OC_Appconfig::getValue( $app, 'ocsid'); @@ -270,7 +246,6 @@ class OC_Installer{ /** * @brief Check if an update for the app is available - * @param string $name name of the application * @return string|false false or the version number of the update * * The function will check if an update for a version is available @@ -316,7 +291,7 @@ class OC_Installer{ * @brief Removes an app * @param string $name name of the application to remove * @param $options array with options - * @return boolean + * @return boolean|null * * This function removes an app. $options is an associative array. The * following keys are optional:ja diff --git a/lib/private/l10n.php b/lib/private/l10n.php index 1d8152c5844..1ade18ea427 100644 --- a/lib/private/l10n.php +++ b/lib/private/l10n.php @@ -99,6 +99,9 @@ class OC_L10N implements \OCP\IL10N { $this->lang = $lang; } + /** + * @param string $transFile + */ public function load($transFile) { $this->app = true; include $transFile; diff --git a/lib/private/legacy/appconfig.php b/lib/private/legacy/appconfig.php index 46a8068c3b4..b6c3542a673 100644 --- a/lib/private/legacy/appconfig.php +++ b/lib/private/legacy/appconfig.php @@ -118,6 +118,8 @@ class OC_Appconfig { * * @param app * @param key + * @param string|false $app + * @param string|false $key * @return array */ public static function getValues($app, $key) { diff --git a/lib/private/legacy/preferences.php b/lib/private/legacy/preferences.php index a663db7598b..fcde12796ca 100644 --- a/lib/private/legacy/preferences.php +++ b/lib/private/legacy/preferences.php @@ -41,7 +41,7 @@ class OC_Preferences{ /** * @brief Get all apps of a user * @param string $user user - * @return array with app ids + * @return integer[] with app ids * * This function returns a list of all apps of the user that have at least * one entry in the preferences table. diff --git a/lib/private/migrate.php b/lib/private/migrate.php index b930b719289..3fb3e334ea2 100644 --- a/lib/private/migrate.php +++ b/lib/private/migrate.php @@ -431,6 +431,7 @@ class OC_Migrate{ /** * @brief connects to migration.db, or creates if not found * @param $db optional path to migration.db, defaults to user data dir + * @param string $path * @return bool whether the operation was successful */ static private function connectDB( $path=null ) { @@ -460,7 +461,7 @@ class OC_Migrate{ /** * @brief creates the tables in migration.db from an apps database.xml - * @param $appid string id of the app + * @param string $appid string id of the app * @return bool whether the operation was successful */ static private function createAppTables( $appid ) { diff --git a/lib/private/migration/content.php b/lib/private/migration/content.php index e7b6543171a..43eba89b8d5 100644 --- a/lib/private/migration/content.php +++ b/lib/private/migration/content.php @@ -34,9 +34,9 @@ class OC_Migration_Content{ /** * @brief sets up the - * @param $zip ZipArchive object + * @param ZipArchive $zip ZipArchive object * @param $db a database object (required for exporttype user) - * @return bool + * @return boolean|null */ public function __construct( $zip, $db=null ) { @@ -74,7 +74,7 @@ class OC_Migration_Content{ /** * @brief processes the db query - * @param $query the query to process + * @param string $query the query to process * @return string of processed query */ private function processQuery( $query ) { @@ -130,7 +130,7 @@ class OC_Migration_Content{ /** * @brief saves a sql data set into migration.db - * @param $data a sql data set returned from self::prepare()->query() + * @param OC_DB_StatementWrapper $data a sql data set returned from self::prepare()->query() * @param $options array of copyRows options * @return void */ diff --git a/lib/private/migration/provider.php b/lib/private/migration/provider.php index 234ab3351f3..2829a97a776 100644 --- a/lib/private/migration/provider.php +++ b/lib/private/migration/provider.php @@ -30,7 +30,7 @@ abstract class OC_Migration_Provider{ /** * @brief sets the OC_Migration_Content object to $this->content - * @param $content a OC_Migration_Content object + * @param OC_Migration_Content $content a OC_Migration_Content object */ public function setData( $uid, $content, $info=null ) { $this->content = $content; diff --git a/lib/private/ocs.php b/lib/private/ocs.php index 2305b3eccfe..bbe965ce561 100644 --- a/lib/private/ocs.php +++ b/lib/private/ocs.php @@ -23,9 +23,6 @@ * */ -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; - /** * Class to handle open collaboration services API requests * @@ -38,7 +35,7 @@ class OC_OCS { * @param string $method HTTP method to read the key from * @param string $key Parameter to read * @param string $type Variable type to format data - * @param mixed $default Default value to return if the key is not found + * @param string $default Default value to return if the key is not found * @return string Data or if the key is not found and no default is set it will exit with a 400 Bad request */ public static function readData($method, $key, $type = 'raw', $default = null) { diff --git a/lib/private/preferences.php b/lib/private/preferences.php index 7ebbf7aa970..d45e6e77089 100644 --- a/lib/private/preferences.php +++ b/lib/private/preferences.php @@ -111,7 +111,7 @@ class Preferences { /** * @brief Get all apps of an user * @param string $user user - * @return array with app ids + * @return integer[] with app ids * * This function returns a list of all apps of the user that have at least * one entry in the preferences table. diff --git a/lib/private/request.php b/lib/private/request.php index a7e7bd0ea1d..0fd20b3cc1f 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -192,7 +192,7 @@ class OC_Request { /** * @brief Check if the requestor understands gzip - * @return boolean true for gzip encoding supported + * @return false|string true for gzip encoding supported */ static public function acceptGZip() { if (!isset($_SERVER['HTTP_ACCEPT_ENCODING'])) { diff --git a/lib/private/share/searchresultsorter.php b/lib/private/share/searchresultsorter.php index fbf77179097..76abbf30846 100644 --- a/lib/private/share/searchresultsorter.php +++ b/lib/private/share/searchresultsorter.php @@ -15,8 +15,8 @@ class SearchResultSorter { private $log; /** - * @param $search the search term as was given by the user - * @param $key the array key containing the value that should be compared + * @param string $search the search term as was given by the user + * @param string $key the array key containing the value that should be compared * against * @param $encoding optional, encoding to use, defaults to UTF-8 * @param $log optional, an \OC\Log instance diff --git a/lib/private/template/base.php b/lib/private/template/base.php index e698d855a91..232a29939cc 100644 --- a/lib/private/template/base.php +++ b/lib/private/template/base.php @@ -30,6 +30,8 @@ class Base { /** * @param string $serverroot * @param string|false $app_dir + * @param string $theme + * @param string $app */ protected function getAppTemplateDirs($theme, $app, $serverroot, $app_dir) { // Check if the app is in the app folder or in the root @@ -47,6 +49,7 @@ class Base { /** * @param string $serverroot + * @param string $theme */ protected function getCoreTemplateDirs($theme, $serverroot) { return array( @@ -119,6 +122,7 @@ class Base { /** * @brief doing the actual work + * @param string $file * @return string content * * Includes the template file, fetches its output diff --git a/lib/private/template/templatefilelocator.php b/lib/private/template/templatefilelocator.php index 05cd752cd4f..4676fceb37d 100644 --- a/lib/private/template/templatefilelocator.php +++ b/lib/private/template/templatefilelocator.php @@ -15,6 +15,7 @@ class TemplateFileLocator { /** * @param string[] $dirs + * @param string $form_factor */ public function __construct( $form_factor, $dirs ) { $this->form_factor = $form_factor; diff --git a/lib/private/user.php b/lib/private/user.php index a8e7967783e..86a01f96258 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -516,6 +516,8 @@ class OC_User { * @returns array with all uids * * Get a list of all users. + * @param integer $limit + * @param integer $offset */ public static function getUsers($search = '', $limit = null, $offset = null) { $users = self::getManager()->search($search, $limit, $offset); diff --git a/lib/private/user/database.php b/lib/private/user/database.php index 094a8f2e2a4..15e6643dfb3 100644 --- a/lib/private/user/database.php +++ b/lib/private/user/database.php @@ -256,7 +256,7 @@ class OC_User_Database extends OC_User_Backend { /** * counts the users in the database * - * @return int | bool + * @return false|string | bool */ public function countUsers() { $query = OC_DB::prepare('SELECT COUNT(*) FROM `*PREFIX*users`'); diff --git a/lib/private/util.php b/lib/private/util.php index af39d983f67..829eedce044 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -218,7 +218,7 @@ class OC_Util { * @brief add a javascript file * * @param string $application - * @param mixed $file filename + * @param string|null $file filename * @return void */ public static function addScript( $application, $file = null ) { @@ -237,7 +237,7 @@ class OC_Util { * @brief add a css file * * @param string $application - * @param mixed $file filename + * @param string|null $file filename * @return void */ public static function addStyle( $application, $file = null ) { @@ -570,6 +570,7 @@ class OC_Util { /** * @brief Check if the app is enabled, redirects to home if not + * @param string $app * @return void */ public static function checkAppEnabled($app) { -- cgit v1.2.3