style(Db,Search,Service): Fix the php files style

I ran "yarn fix".

Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
pull/273/head
Baptiste Fotia 2024-04-26 15:40:55 +02:00
parent 18a4a4ebc9
commit a872bea3dc
3 changed files with 12 additions and 14 deletions

View File

@ -110,8 +110,8 @@ class RoomMapper extends QBMapper {
->from($this->tableName, 'r') ->from($this->tableName, 'r')
->where($qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId))) ->where($qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)))
->andwhere($qb->expr()->ILike('name', ->andwhere($qb->expr()->ILike('name',
$qb->createNamedParameter('%' . $this->db->escapeLikeParameter($query) . '%', IQueryBuilder::PARAM_STR), $qb->createNamedParameter('%' . $this->db->escapeLikeParameter($query) . '%', IQueryBuilder::PARAM_STR),
IQueryBuilder::PARAM_STR)); IQueryBuilder::PARAM_STR));
/** @var array<Room> */ /** @var array<Room> */
return $this->findEntities($qb); return $this->findEntities($qb);

View File

@ -6,7 +6,6 @@ namespace OCA\BigBlueButton\Search;
use OCA\BigBlueButton\AppInfo\Application; use OCA\BigBlueButton\AppInfo\Application;
use OCA\BigBlueButton\Service\RoomService; use OCA\BigBlueButton\Service\RoomService;
use OCA\BigBlueButton\Db\Room;
use OCP\IL10N; use OCP\IL10N;
use OCP\IURLGenerator; use OCP\IURLGenerator;
use OCP\IUser; use OCP\IUser;
@ -14,7 +13,6 @@ use OCP\Search\IProvider;
use OCP\Search\ISearchQuery; use OCP\Search\ISearchQuery;
use OCP\Search\SearchResult; use OCP\Search\SearchResult;
use OCP\Search\SearchResultEntry; use OCP\Search\SearchResultEntry;
use function array_map;
class Provider implements IProvider { class Provider implements IProvider {
/** @var RoomService */ /** @var RoomService */
@ -42,8 +40,8 @@ class Provider implements IProvider {
public function getOrder(string $route, array $routeParameters): int { public function getOrder(string $route, array $routeParameters): int {
if (strpos($route, Application::ID . '.') === 0) { if (strpos($route, Application::ID . '.') === 0) {
return -1; return -1;
} }
return Application::ORDER; return Application::ORDER;
} }
@ -71,7 +69,7 @@ class Provider implements IProvider {
return $translatedAccess; return $translatedAccess;
} }
public function search(IUser $user, ISearchQuery $query): SearchResult { public function search(IUser $user, ISearchQuery $query): SearchResult {
$rooms = $this->service->search( $rooms = $this->service->search(
$user, $user,
$query $query
@ -79,7 +77,7 @@ class Provider implements IProvider {
$results = []; $results = [];
foreach($rooms as $room) { foreach ($rooms as $room) {
$results[] = new SearchResultEntry( $results[] = new SearchResultEntry(
'', '',
$room->getName(), $room->getName(),
@ -89,9 +87,9 @@ class Provider implements IProvider {
); );
} }
return SearchResult::complete( return SearchResult::complete(
'BBB', 'BBB',
$results $results
); );
} }
} }

View File

@ -14,8 +14,8 @@ use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig; use OCP\IConfig;
use OCP\IUser; use OCP\IUser;
use OCP\Security\ISecureRandom;
use OCP\Search\ISearchQuery; use OCP\Search\ISearchQuery;
use OCP\Security\ISecureRandom;
class RoomService { class RoomService {
/** @var RoomMapper */ /** @var RoomMapper */