Skip to content

Commit

Permalink
composer run cs:fix
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jun 9, 2022
1 parent e3429cc commit 267f471
Show file tree
Hide file tree
Showing 39 changed files with 80 additions and 236 deletions.
3 changes: 1 addition & 2 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -34,5 +35,3 @@
['name' => 'Settings#setSettingsAdmin', 'url' => '/admin/settings', 'verb' => 'POST']
]
];


9 changes: 2 additions & 7 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,8 +31,6 @@

namespace OCA\Files_FullTextSearch\AppInfo;


use Closure;
use OCA\Files_FullTextSearch\Listeners\FileChanged;
use OCA\Files_FullTextSearch\Listeners\FileCreated;
use OCA\Files_FullTextSearch\Listeners\FileDeleted;
Expand All @@ -50,7 +49,6 @@
use OCP\Share\Events\ShareDeletedEvent;
use Throwable;


require_once __DIR__ . '/../../vendor/autoload.php';


Expand All @@ -60,9 +58,7 @@
* @package OCA\Files_FullTextSearch\AppInfo
*/
class Application extends App implements IBootstrap {


const APP_ID = 'files_fulltextsearch';
public const APP_ID = 'files_fulltextsearch';


/**
Expand Down Expand Up @@ -97,4 +93,3 @@ public function register(IRegistrationContext $context): void {
public function boot(IBootContext $context): void {
}
}

6 changes: 1 addition & 5 deletions lib/Command/Configure.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,7 +31,6 @@

namespace OCA\Files_FullTextSearch\Command;


use Exception;
use OC\Core\Command\Base;
use OCA\Files_FullTextSearch\Service\ConfigService;
Expand All @@ -39,7 +39,6 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;


/**
* Class Configure
*
Expand Down Expand Up @@ -109,7 +108,4 @@ protected function execute(InputInterface $input, OutputInterface $output) {

return 0;
}


}

6 changes: 1 addition & 5 deletions lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,7 +31,6 @@

namespace OCA\Files_FullTextSearch\Controller;


use Exception;
use OCA\Files_FullTextSearch\AppInfo\Application;
use OCA\Files_FullTextSearch\Service\ConfigService;
Expand All @@ -42,7 +42,6 @@
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;


/**
* Class SettingsController
*
Expand Down Expand Up @@ -104,13 +103,10 @@ public function getSettingsAdmin(): DataResponse {
* @throws Exception
*/
public function setSettingsAdmin(array $data): DataResponse {

if ($this->settingsService->checkConfig($data)) {
$this->configService->setConfig($data);
}

return $this->getSettingsAdmin();
}

}

5 changes: 1 addition & 4 deletions lib/Db/CoreQueryBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,8 @@

namespace OCA\Files_FullTextSearch\Db;


use ArtificialOwl\MySmallPhpTools\Db\ExtendedQueryBuilder;


/**
* Class CoreQueryBuilder
*
Expand All @@ -49,6 +48,4 @@ class CoreQueryBuilder extends ExtendedQueryBuilder {
public function limitToFileSource(int $fileSource) {
$this->limitToDBFieldInt('file_source', $fileSource);
}

}

9 changes: 2 additions & 7 deletions lib/Db/CoreRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,23 +31,19 @@

namespace OCA\Files_FullTextSearch\Db;


use OC;
use OC\SystemConfig;
use OCA\Files_FullTextSearch\Service\MiscService;
use OCP\IDBConnection;
use Psr\Log\LoggerInterface;


/**
* Class CoreRequestBuilder
*
* @package OCA\Files_FullTextSearch\Db
*/
class CoreRequestBuilder {


const TABLE_SHARES = 'share';
public const TABLE_SHARES = 'share';


/** @var MiscService */
Expand Down Expand Up @@ -75,6 +72,4 @@ public function getQueryBuilder(): CoreQueryBuilder {
OC::$server->get(LoggerInterface::class)
);
}

}

6 changes: 1 addition & 5 deletions lib/Db/SharesRequest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,11 +31,9 @@

namespace OCA\Files_FullTextSearch\Db;


use Exception;
use OCP\Files\Node;


class SharesRequest extends SharesRequestBuilder {


Expand All @@ -44,7 +43,6 @@ class SharesRequest extends SharesRequestBuilder {
* @return array
*/
public function getFromFile(Node $file): array {

$shares = [];
try {
$qb = $this->getSharesSelectSql();
Expand All @@ -61,6 +59,4 @@ public function getFromFile(Node $file): array {

return $shares;
}

}

4 changes: 1 addition & 3 deletions lib/Db/SharesRequestBuilder.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,7 +31,6 @@

namespace OCA\Files_FullTextSearch\Db;


class SharesRequestBuilder extends CoreRequestBuilder {

/**
Expand All @@ -47,6 +47,4 @@ protected function getSharesSelectSql(): CoreQueryBuilder {

return $qb;
}

}

4 changes: 1 addition & 3 deletions lib/Exceptions/EmptyUserException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class EmptyUserException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/ExternalMountNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class ExternalMountNotFoundException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/ExternalMountWithNoViewerException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class ExternalMountWithNoViewerException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/FileIsNotIndexableException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class FileIsNotIndexableException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/FilesNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class FilesNotFoundException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/GroupFolderNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class GroupFolderNotFoundException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/KnownFileMimeTypeException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class KnownFileMimeTypeException extends Exception {
}

4 changes: 1 addition & 3 deletions lib/Exceptions/KnownFileSourceException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);


Expand Down Expand Up @@ -30,10 +31,7 @@

namespace OCA\Files_FullTextSearch\Exceptions;


use Exception;


class KnownFileSourceException extends Exception {
}

3 changes: 0 additions & 3 deletions lib/Listeners/FileChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use OCP\Files\NotFoundException;
use OCP\FullTextSearch\Model\IIndex;


/**
* Class FileChanged
*
Expand All @@ -65,6 +64,4 @@ public function handle(Event $event): void {
$this->exception($e);
}
}

}

Loading

0 comments on commit 267f471

Please sign in to comment.