Skip to content

Commit

Permalink
chore: Align code style (composer cs:fix)
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Aug 21, 2024
1 parent 963c053 commit 16516bb
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion lib/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

namespace OCA\Officeonline;

use OCA\Officeonline\AppInfo\Application;
use \OCP\IConfig;
use OCA\Officeonline\AppInfo\Application;

class AppConfig {
private $defaults = [
Expand Down
6 changes: 3 additions & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
use OCA\Officeonline\Capabilities;
use OCA\Officeonline\Hooks\WopiLockHooks;
use OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener;
use OCA\Officeonline\Listener\LoadViewerListener;
use OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener;
use OCA\Officeonline\Middleware\WOPIMiddleware;
use OCA\Officeonline\PermissionManager;
use OCA\Officeonline\Preview\MSExcel;
Expand All @@ -47,10 +47,10 @@
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Files\Template\ITemplateManager;
use OCP\Files\Template\TemplateFileCreator;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IPreview;
use Psr\Log\LoggerInterface;
use OCP\IL10N;
use OCP\IConfig;

class Application extends App implements IBootstrap {
public const APP_ID = 'officeonline';
Expand Down
24 changes: 12 additions & 12 deletions lib/Controller/DocumentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@

namespace OCA\Officeonline\Controller;

use \OCA\Officeonline\AppConfig;
use \OCA\Officeonline\Helper;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http\ContentSecurityPolicy;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCP\IConfig;
use \OCP\IL10N;
use \OCP\ILogger;
use \OCP\IRequest;
use OC\Files\Type\TemplateManager;
use OCA\Officeonline\Service\FederationService;
use OCA\Officeonline\TokenManager;
use \OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\RedirectResponse;
Expand All @@ -25,18 +34,9 @@
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use \OCP\IRequest;
use \OCP\IConfig;
use \OCP\IL10N;
use \OCP\ILogger;
use \OCP\AppFramework\Http\ContentSecurityPolicy;
use \OCP\AppFramework\Http\TemplateResponse;
use \OCA\Officeonline\AppConfig;
use \OCA\Officeonline\Helper;
use OCP\ISession;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OC\Files\Type\TemplateManager;

class DocumentController extends Controller {
/** @var string */
Expand Down Expand Up @@ -485,8 +485,8 @@ public function remote($shareToken, $remoteServer, $remoteServerToken, $filePath
* @throws GenericFileException
*/
public function create($mimetype,
$filename,
$dir = '/') {
$filename,
$dir = '/') {
$root = $this->rootFolder->getUserFolder($this->uid);
try {
/** @var Folder $folder */
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
*/
namespace OCA\Officeonline\Controller;

use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use \OCP\AppFramework\OCSController;
use OCA\Officeonline\Db\WopiMapper;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\IConfig;
use OCP\IRequest;
Expand Down
20 changes: 10 additions & 10 deletions lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

namespace OCA\Officeonline\Controller;

use \OCP\AppFramework\Controller;
use \OCP\IL10N;
use \OCP\IRequest;
use Exception;
use OCA\Officeonline\AppConfig;
use OCA\Officeonline\WOPI\DiscoveryManager;
use \OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\ILogger;
use \OCP\IRequest;
use \OCP\IL10N;
use OCA\Officeonline\AppConfig;

class SettingsController extends Controller {

Expand Down Expand Up @@ -80,12 +80,12 @@ public function getSettings(): JSONResponse {
}

public function setSettings($wopi_url,
$disable_certificate_verification,
$edit_groups,
$use_groups,
$doc_format,
$external_apps,
$canonical_webroot): JSONResponse {
$disable_certificate_verification,
$edit_groups,
$use_groups,
$doc_format,
$external_apps,
$canonical_webroot): JSONResponse {
$message = $this->l10n->t('Saved');

if ($wopi_url !== null) {
Expand Down
10 changes: 5 additions & 5 deletions lib/Controller/TemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

namespace OCA\Officeonline\Controller;

use OC\Files\Filesystem;
use OCA\Officeonline\TemplateManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
Expand All @@ -38,7 +39,6 @@
use OCP\IL10N;
use OCP\IPreview;
use OCP\IRequest;
use OC\Files\Filesystem;

class TemplatesController extends Controller {
/** @var IL10N */
Expand All @@ -63,10 +63,10 @@ class TemplatesController extends Controller {
* @param IPreview $preview
*/
public function __construct($appName,
IRequest $request,
IL10N $l10n,
TemplateManager $manager,
IPreview $preview) {
IRequest $request,
IL10N $l10n,
TemplateManager $manager,
IPreview $preview) {
parent::__construct($appName, $request);

$this->appName = $appName;
Expand Down
16 changes: 8 additions & 8 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,34 @@
namespace OCA\Officeonline\Controller;

use Exception;
use OCP\Files\Lock\LockContext;
use OCP\Files\Lock\ILock;
use OC\Files\View;
use OCA\Officeonline\AppConfig;
use OCA\Officeonline\AppInfo\Application;

use OC\Files\View;
use OCA\Officeonline\Db\Wopi;
use OCA\Officeonline\AppConfig;
use OCA\Officeonline\Db\WopiLock;
use OCA\Officeonline\Db\WopiLockMapper;
use OCA\Officeonline\Db\WopiMapper;
use OCA\Officeonline\Helper;
use OCA\Officeonline\Hooks\WopiLockHooks;
use OCA\Officeonline\Service\UserScopeService;
use OCA\Officeonline\TemplateManager;
use OCA\Officeonline\TokenManager;
use OCA\Officeonline\Helper;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\StreamResponse;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\GenericFileException;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\Lock\ILock;
use OCP\Files\Lock\ILockManager;
use OCP\Files\Lock\LockContext;
use OCP\Files\Lock\NoLockProviderException;
use OCP\Files\Lock\OwnerLockedException;
use OCP\Files\Node;
Expand All @@ -58,7 +59,6 @@
use OCP\ILogger;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\AppFramework\Http\StreamResponse;
use OCP\IUserManager;
use OCP\Lock\LockedException;
use OCP\PreConditionNotMetException;
Expand Down Expand Up @@ -288,7 +288,7 @@ private function setFederationFileInfo($wopi, $response) {
* @throws NotPermittedException
*/
public function getFile($fileId,
$access_token) {
$access_token) {
[$fileId, , $version] = Helper::parseFileId($fileId);

$wopi = $this->wopiMapper->getWopiForToken($access_token);
Expand Down Expand Up @@ -538,7 +538,7 @@ private function getLock(Wopi $wopi): JSONResponse {
* @return JSONResponse
*/
public function putFile($fileId,
$access_token) {
$access_token) {
[$fileId, ,] = Helper::parseFileId($fileId);
$isPutRelative = ($this->request->getHeader('X-WOPI-Override') === 'PUT_RELATIVE');
$isRenameFile = ($this->request->getHeader('X-WOPI-Override') === 'RENAME_FILE');
Expand Down
4 changes: 2 additions & 2 deletions lib/Db/DirectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class DirectMapper extends QBMapper {
protected $timeFactory;

public function __construct(IDBConnection $db,
ISecureRandom $random,
ITimeFactory $timeFactory) {
ISecureRandom $random,
ITimeFactory $timeFactory) {
parent::__construct($db, 'officeonline_direct', Direct::class);

$this->random = $random;
Expand Down
6 changes: 3 additions & 3 deletions lib/Db/WopiMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class WopiMapper extends QBMapper {
private $timeFactory;

public function __construct(IDBConnection $db,
ISecureRandom $random,
ILogger $logger,
ITimeFactory $timeFactory) {
ISecureRandom $random,
ILogger $logger,
ITimeFactory $timeFactory) {
parent::__construct($db, 'officeonline_wopi', Wopi::class);

$this->random = $random;
Expand Down
2 changes: 1 addition & 1 deletion lib/Hooks/WopiLockHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace OCA\Officeonline\Hooks;

use OCA\Officeonline\Db\WopiLockMapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\File;
use OCA\Officeonline\Db\WopiLockMapper;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version1000Date20200826201000.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

class Version1000Date20200826201000 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
Expand Down
2 changes: 1 addition & 1 deletion lib/PermissionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PermissionManager {
private $groupManager;

public function __construct(IConfig $config,
IGroupManager $groupManager) {
IGroupManager $groupManager) {
$this->config = $config;
$this->groupManager = $groupManager;
}
Expand Down
14 changes: 7 additions & 7 deletions lib/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

namespace OCA\Officeonline;

use OC\Files\AppData\Factory;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IAppData;
Expand All @@ -34,7 +35,6 @@
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
use OC\Files\AppData\Factory;

class TemplateManager {

Expand Down Expand Up @@ -117,12 +117,12 @@ class TemplateManager {
* @throws \OCP\Files\NotPermittedException
*/
public function __construct($appName,
$userId,
IConfig $config,
IAppData $appData,
IURLGenerator $urlGenerator,
IRootFolder $rootFolder,
IL10N $l) {
$userId,
IConfig $config,
IAppData $appData,
IURLGenerator $urlGenerator,
IRootFolder $rootFolder,
IL10N $l) {
$this->appName = $appName;
$this->userId = $userId;
$this->config = $config;
Expand Down
4 changes: 2 additions & 2 deletions lib/TokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@

namespace OCA\Officeonline;

use OCA\Officeonline\Db\WopiMapper;
use OCA\Officeonline\Db\Wopi;
use OCA\Officeonline\Db\WopiMapper;
use OCA\Officeonline\Service\CapabilitiesService;
use OCA\Officeonline\WOPI\Parser;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Share\IManager;
use OCP\IL10N;
use OCP\Util;

class TokenManager {
Expand Down
8 changes: 4 additions & 4 deletions lib/WOPI/DiscoveryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class DiscoveryManager {
* @param ITimeFactory $timeFactory
*/
public function __construct(IClientService $clientService,
IAppData $appData,
IConfig $config,
IL10N $l10n,
ITimeFactory $timeFactory) {
IAppData $appData,
IConfig $config,
IL10N $l10n,
ITimeFactory $timeFactory) {
$this->clientService = $clientService;
try {
$this->appData = $appData->getFolder('officeonline');
Expand Down

0 comments on commit 16516bb

Please sign in to comment.