From c8d44199c2debd7d44ed6cdc394d53eff7477f98 Mon Sep 17 00:00:00 2001 From: Aleksandr Fedorov Date: Thu, 1 Jun 2023 16:21:36 +0300 Subject: [PATCH] php: fix lint --- web/documentserver-example/php/ajax.php | 6 ++++-- web/documentserver-example/php/functions.php | 3 ++- web/documentserver-example/php/helpers/ConfigManager.php | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/web/documentserver-example/php/ajax.php b/web/documentserver-example/php/ajax.php index 94ca202c..ef572df5 100644 --- a/web/documentserver-example/php/ajax.php +++ b/web/documentserver-example/php/ajax.php @@ -364,7 +364,8 @@ function assets() { $fileName = basename($_GET["name"]); $filePath = dirname(__FILE__) . - DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "document-templates" . DIRECTORY_SEPARATOR . "sample" . DIRECTORY_SEPARATOR . $fileName; + DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "document-templates" + . DIRECTORY_SEPARATOR . "sample" . DIRECTORY_SEPARATOR . $fileName; downloadFile($filePath); } @@ -377,7 +378,8 @@ function csv() { $fileName = "csv.csv"; $filePath = dirname(__FILE__) . - DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "document-templates" . DIRECTORY_SEPARATOR . "sample" . DIRECTORY_SEPARATOR . $fileName; + DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "document-templates" + . DIRECTORY_SEPARATOR . "sample" . DIRECTORY_SEPARATOR . $fileName; downloadFile($filePath); } diff --git a/web/documentserver-example/php/functions.php b/web/documentserver-example/php/functions.php index 80ad62e8..a5280889 100644 --- a/web/documentserver-example/php/functions.php +++ b/web/documentserver-example/php/functions.php @@ -889,7 +889,8 @@ function getResponseUri($document_response, &$response_uri) function tryGetDefaultByType($createExt, $user) { $demoName = (isset($_GET["sample"]) ? "sample." : "new.") . $createExt; - $demoPath = "assets" . DIRECTORY_SEPARATOR . "document-templates" . DIRECTORY_SEPARATOR . (isset($_GET["sample"]) ? "sample" : "new") . DIRECTORY_SEPARATOR; + $demoPath = "assets" . DIRECTORY_SEPARATOR . "document-templates" . DIRECTORY_SEPARATOR + . (isset($_GET["sample"]) ? "sample" : "new") . DIRECTORY_SEPARATOR; $demoFilename = GetCorrectName($demoName); if (!@copy(dirname(__FILE__) . DIRECTORY_SEPARATOR . $demoPath . $demoName, getStoragePath($demoFilename))) { diff --git a/web/documentserver-example/php/helpers/ConfigManager.php b/web/documentserver-example/php/helpers/ConfigManager.php index d4ba8398..6292f38b 100644 --- a/web/documentserver-example/php/helpers/ConfigManager.php +++ b/web/documentserver-example/php/helpers/ConfigManager.php @@ -36,7 +36,9 @@ final class ConfigManager private function getConfigurationFromatsJson(): bool|string { - return file_exists("./assets/document-formats/onlyoffice-docs-formats.json") ? file_get_contents("./assets/document-formats/onlyoffice-docs-formats.json") : false; + return file_exists("./assets/document-formats/onlyoffice-docs-formats.json") + ? file_get_contents("./assets/document-formats/onlyoffice-docs-formats.json") + : false; } /**