Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
  • Loading branch information
Florian Steffens committed Aug 10, 2023
1 parent cdaaec9 commit 9c0503e
Show file tree
Hide file tree
Showing 26 changed files with 184 additions and 548 deletions.
3 changes: 0 additions & 3 deletions lib/Api/V1Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
namespace OCA\Tables\Api;

use OCA\Tables\Errors\InternalError;
use OCA\Tables\Errors\NotFoundError;
use OCA\Tables\Errors\PermissionError;
use OCA\Tables\Service\ColumnService;
use OCA\Tables\Service\RowService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;

class V1Api {
private RowService $rowService;
Expand Down
4 changes: 1 addition & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
use OCA\Tables\Listener\AnalyticsDatasourceListener;
use OCA\Tables\Listener\TablesReferenceListener;
use OCA\Tables\Listener\UserDeletedListener;
use OCA\Tables\Reference\LegacyReferenceProvider;
use OCA\Tables\Reference\RowReferenceProvider;
use OCA\Tables\Reference\ContentReferenceProvider;
use OCA\Tables\Reference\LegacyReferenceProvider;
use OCA\Tables\Reference\ReferenceProvider;
use OCA\Tables\Reference\ViewReferenceProvider;
use OCA\Tables\Search\SearchTablesProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/Api1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public function createRowInView(
];
}

return $this->handleError(function () use ( $viewId, $dataNew) {
return $this->handleError(function () use ($viewId, $dataNew) {
return $this->rowService->create(null, $viewId, $dataNew);
});
}
Expand Down Expand Up @@ -553,8 +553,8 @@ public function getRow(int $rowId): DataResponse {
* @NoCSRFRequired
*/
public function updateRow(int $rowId,
?int $viewId,
array $data): DataResponse {
?int $viewId,
array $data): DataResponse {
$dataNew = [];
foreach ($data as $key => $value) {
$dataNew[] = [
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace OCA\Tables\Controller;

use OCA\Tables\AppInfo\Application;
use OCA\Tables\Service\ImportService;
use OCA\Tables\Service\SearchService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/ShareMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ShareMapper extends QBMapper {
protected string $table = 'tables_shares';
protected LoggerInterface $logger;

public function __construct( LoggerInterface $logger, IDBConnection $db) {
public function __construct(LoggerInterface $logger, IDBConnection $db) {
parent::__construct($db, $this->table, Share::class);
$this->logger = $logger;
}
Expand Down
7 changes: 2 additions & 5 deletions lib/Reference/LegacyReferenceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@
namespace OCA\Tables\Reference;

use OC\Collaboration\Reference\ReferenceManager;
use OCA\Tables\AppInfo\Application;
use OCP\Collaboration\Reference\ADiscoverableReferenceProvider;
use OCP\Collaboration\Reference\IReference;
use OCP\Collaboration\Reference\IReferenceProvider;
use OCP\Collaboration\Reference\ISearchableReferenceProvider;
use OCP\IL10N;
use OCP\IURLGenerator;

class LegacyReferenceProvider implements IReferenceProvider {
private TableReferenceHelper $referenceHelper;
private ReferenceHelper $referenceHelper;
private ReferenceManager $referenceManager;
private IURLGenerator $urlGenerator;
private IL10N $l10n;

public function __construct(IL10N $l10n, IURLGenerator $urlGenerator, TableReferenceHelper $referenceHelper, ReferenceManager $referenceManager) {
public function __construct(IL10N $l10n, IURLGenerator $urlGenerator, ReferenceHelper $referenceHelper, ReferenceManager $referenceManager) {
$this->referenceHelper = $referenceHelper;
$this->referenceManager = $referenceManager;
$this->urlGenerator = $urlGenerator;
Expand Down
1 change: 0 additions & 1 deletion lib/Reference/ReferenceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use OCA\Tables\AppInfo\Application;
use OCP\Collaboration\Reference\ADiscoverableReferenceProvider;
use OCP\Collaboration\Reference\IReference;
use OCP\Collaboration\Reference\IReferenceProvider;
use OCP\Collaboration\Reference\ISearchableReferenceProvider;
use OCP\IL10N;
use OCP\IURLGenerator;
Expand Down
132 changes: 0 additions & 132 deletions lib/Reference/stuff/RowReferenceHelper.php

This file was deleted.

61 changes: 0 additions & 61 deletions lib/Reference/stuff/RowReferenceProvider.php

This file was deleted.

Loading

0 comments on commit 9c0503e

Please sign in to comment.