Skip to content

Commit

Permalink
fix doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rivexe committed Dec 20, 2023
1 parent a9f473e commit c568f47
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 14 deletions.
10 changes: 10 additions & 0 deletions appinfo/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
use OCA\Onlyoffice\Notifier;
use OCA\Onlyoffice\Preview;

/**
* Class Application
*
* @package OCA\Onlyoffice\AppInfo
*/
class Application extends App {
/**
* Application configuration
Expand All @@ -57,6 +62,11 @@ class Application extends App {
*/
public $crypt;

/**
* Application constructor.
*
* @param array $urlParams
*/
public function __construct(array $urlParams = []) {
$appName = "onlyoffice";

Expand Down
2 changes: 2 additions & 0 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,8 @@ private function parseUserId($userId) {
* @param callable $operation
*
* @throws LockedException
*
* @return void
*/
private function retryOperation(callable $operation) {
$i = 0;
Expand Down
5 changes: 3 additions & 2 deletions controller/editorapicontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class EditorApiController extends OCSController {
* @param AppConfig $config - application configuration
* @param Crypt $crypt - hash generator
* @param IManager $shareManager - Share manager
* @param ISession $ISession - Session
* @param ISession $session - Session
* @param ITagManager $tagManager - Tag manager
*/
public function __construct(
Expand Down Expand Up @@ -233,6 +233,7 @@ public function fillempty($fileId) {
* @param bool $inframe - open in frame
* @param bool $desktop - desktop label
* @param bool $template - file is template
* @param string $anchor - anchor link
*
* @return JSONResponse
*
Expand Down Expand Up @@ -668,7 +669,7 @@ private function buildUserId($userId) {
/**
* Set customization parameters
*
* @param array params - file parameters
* @param array $params - file parameters
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion controller/federationcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class FederationController extends OCSController {
* @param IL10N $trans - l10n service
* @param ILogger $logger - logger
* @param IManager $shareManager - Share manager
* @param IManager $ISession - Session
* @param IManager $session - Session
*/
public function __construct(
$AppName,
Expand Down
6 changes: 6 additions & 0 deletions controller/joblistcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function __construct($AppName, IRequest $request, ILogger $logger, AppCon
* Add a job to list
*
* @param IJob|string $job
*
* @return void
*/
private function addJob($job) {
if (!$this->jobList->has($job, null)) {
Expand All @@ -93,6 +95,8 @@ private function addJob($job) {
* Remove a job from list
*
* @param IJob|string $job
*
* @return void
*/
private function removeJob($job) {
if ($this->jobList->has($job, null)) {
Expand All @@ -104,6 +108,7 @@ private function removeJob($job) {
/**
* Add or remove EditorsCheck job depending on the value of _editors_check_interval
*
* @return void
*/
private function checkEditorsCheckJob() {
if ($this->config->GetEditorsCheckInterval() > 0) {
Expand All @@ -116,6 +121,7 @@ private function checkEditorsCheckJob() {
/**
* Method for sequentially calling checks of all jobs
*
* @return void
*/
public function checkAllJobs() {
$this->checkEditorsCheckJob();
Expand Down
2 changes: 1 addition & 1 deletion controller/settingscontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ public function index() {
/**
* Save address settings
*
* @param string $jwtHeader - jwt header
* @param string $documentserver - document service address
* @param string $documentserverInternal - document service address available from ownCloud
* @param string $storageUrl - ownCloud address available from document server
* @param bool $verifyPeerOff - parameter verification setting
* @param string $secret - secret key for signature
* @param string $jwtHeader - jwt header
* @param bool $demo - use demo server
*
* @return array
Expand Down
3 changes: 3 additions & 0 deletions controller/templatecontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class TemplateController extends Controller {
* @param string $AppName - application name
* @param IRequest $request - request object
* @param IL10N $trans - l10n service
* @param ILogger $logger - logger
*/
public function __construct(
$AppName,
Expand Down Expand Up @@ -134,6 +135,8 @@ public function AddTemplate() {
* Delete template
*
* @param string $templateId - file identifier
*
* @return array
*/
public function DeleteTemplate($templateId) {
$templateDir = TemplateManager::GetGlobalTemplateDir();
Expand Down
4 changes: 4 additions & 0 deletions lib/adminsettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
* Settings controller for the administration page
*/
class AdminSettings implements ISettings {

/**
* Constructor
*/
public function __construct() {
}

Expand Down
55 changes: 54 additions & 1 deletion lib/appconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ public function UseDemo() {
* Save the document service address to the application configuration
*
* @param string $documentServer - document service address
*
* @return void
*/
public function SetDocumentServerUrl($documentServer) {
$documentServer = trim($documentServer);
Expand Down Expand Up @@ -447,6 +449,8 @@ public function GetDocumentServerUrl($origin = false) {
* Save the document service address available from ownCloud to the application configuration
*
* @param string $documentServerInternal - document service address
*
* @return void
*/
public function SetDocumentServerInternalUrl($documentServerInternal) {
$documentServerInternal = rtrim(trim($documentServerInternal), "/");
Expand Down Expand Up @@ -514,6 +518,8 @@ public function ReplaceDocumentServerUrlToInternal($url) {
* Save the ownCloud address available from document server to the application configuration
*
* @param string $documentServer - document service address
*
* @return void
*/
public function SetStorageUrl($storageUrl) {
$storageUrl = rtrim(trim($storageUrl), "/");
Expand Down Expand Up @@ -546,6 +552,8 @@ public function GetStorageUrl() {
* Save the document service secret key to the application configuration
*
* @param string $secret - secret key
*
* @return void
*/
public function SetDocumentServerSecret($secret) {
$secret = trim($secret);
Expand Down Expand Up @@ -594,6 +602,8 @@ public function GetSKey() {
* Save an array of formats with default action
*
* @param array $formats - formats with status
*
* @return void
*/
public function SetDefaultFormats($formats) {
$value = json_encode($formats);
Expand All @@ -619,6 +629,8 @@ private function GetDefaultFormats() {
* Save an array of formats that is opened for editing
*
* @param array $formats - formats with status
*
* @return void
*/
public function SetEditableFormats($formats) {
$value = json_encode($formats);
Expand All @@ -644,6 +656,8 @@ private function GetEditableFormats() {
* Save the opening setting in a same tab
*
* @param bool $value - same tab
*
* @return void
*/
public function SetSameTab($value) {
$this->logger->info("Set opening in a same tab: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -664,6 +678,8 @@ public function GetSameTab() {
* Save generate preview setting
*
* @param bool $value - preview
*
* @return bool
*/
public function SetPreview($value) {
$this->logger->info("Set generate preview: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -684,6 +700,8 @@ public function GetPreview() {
* Save keep versions history
*
* @param bool $value - version history
*
* @return void
*/
public function SetVersionHistory($value) {
$this->logger->info("Set keep versions history: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -704,6 +722,8 @@ public function GetVersionHistory() {
* Save protection
*
* @param bool $value - version history
*
* @return void
*/
public function SetProtection($value) {
$this->logger->info("Set protection: " . $value, ["app" => $this->appName]);
Expand All @@ -714,7 +734,7 @@ public function SetProtection($value) {
/**
* Get protection
*
* @return bool
* @return string
*/
public function GetProtection() {
$value = $this->config->getAppValue($this->appName, $this->_protection, "owner");
Expand All @@ -728,6 +748,8 @@ public function GetProtection() {
* Save chat display setting
*
* @param bool $value - display chat
*
* @return void
*/
public function SetCustomizationChat($value) {
$this->logger->info("Set chat display: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -748,6 +770,8 @@ public function GetCustomizationChat() {
* Save compact header setting
*
* @param bool $value - display compact header
*
* @return void
*/
public function SetCustomizationCompactHeader($value) {
$this->logger->info("Set compact header display: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -768,6 +792,8 @@ public function GetCustomizationCompactHeader() {
* Save feedback display setting
*
* @param bool $value - display feedback
*
* @return void
*/
public function SetCustomizationFeedback($value) {
$this->logger->info("Set feedback display: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -788,6 +814,8 @@ public function GetCustomizationFeedback() {
* Save forcesave setting
*
* @param bool $value - forcesave
*
* @return void
*/
public function SetCustomizationForcesave($value) {
$this->logger->info("Set forcesave: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -810,6 +838,8 @@ public function GetCustomizationForcesave() {
* Save help display setting
*
* @param bool $value - display help
*
* @return void
*/
public function SetCustomizationHelp($value) {
$this->logger->info("Set help display: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -830,6 +860,8 @@ public function GetCustomizationHelp() {
* Save without tabs setting
*
* @param bool $value - without tabs
*
* @return void
*/
public function SetCustomizationToolbarNoTabs($value) {
$this->logger->info("Set without tabs: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -850,6 +882,8 @@ public function GetCustomizationToolbarNoTabs() {
* Save review viewing mode setting
*
* @param string $value - review mode
*
* @return void
*/
public function SetCustomizationReviewDisplay($value) {
$this->logger->info("Set review mode: " . $value, ["app" => $this->appName]);
Expand Down Expand Up @@ -877,6 +911,8 @@ public function GetCustomizationReviewDisplay() {
* Save theme setting
*
* @param string $value - theme
*
* @return void
*/
public function SetCustomizationTheme($value) {
$this->logger->info("Set theme: " . $value, ["app" => $this->appName]);
Expand Down Expand Up @@ -904,6 +940,8 @@ public function GetCustomizationTheme() {
* Save macros setting
*
* @param bool $value - enable macros
*
* @return void
*/
public function SetCustomizationMacros($value) {
$this->logger->info("Set macros enabled: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -924,6 +962,8 @@ public function GetCustomizationMacros() {
* Save plugins setting
*
* @param bool $value - enable macros
*
* @return void
*/
public function SetCustomizationPlugins($value) {
$this->logger->info("Set plugins enabled: " . json_encode($value), ["app" => $this->appName]);
Expand All @@ -944,6 +984,8 @@ public function GetCustomizationPlugins() {
* Save the list of groups
*
* @param array $groups - the list of groups
*
* @return void
*/
public function SetLimitGroups($groups) {
if (!\is_array($groups)) {
Expand Down Expand Up @@ -1021,6 +1063,8 @@ public function isUserAllowedToUse($userId = null) {
* Save the document service verification setting to the application configuration
*
* @param bool $verifyPeerOff - parameter verification setting
*
* @return void
*/
public function SetVerifyPeerOff($verifyPeerOff) {
$this->logger->info("SetVerifyPeerOff " . json_encode($verifyPeerOff), ["app" => $this->appName]);
Expand Down Expand Up @@ -1084,6 +1128,8 @@ public function JwtHeader($origin = false) {
* Save the jwtHeader setting
*
* @param string $value - jwtHeader
*
* @return void
*/
public function SetJwtHeader($value) {
$value = trim($value);
Expand Down Expand Up @@ -1111,6 +1157,8 @@ public function GetJwtLeeway() {
* Save the status settings
*
* @param string $value - error
*
* @return void
*/
public function SetSettingsError($value) {
$this->config->setAppValue($this->appName, $this->_settingsError, $value);
Expand Down Expand Up @@ -1174,6 +1222,11 @@ public function FormatsSetting() {
return $result;
}

/**
* Get version of share attributes
*
* @return string
*/
public function ShareAttributesVersion() {
if (\version_compare(\implode(".", \OCP\Util::getVersion()), "10.3.0", ">=")) {
return "v2";
Expand Down
Loading

0 comments on commit c568f47

Please sign in to comment.