Skip to content

Commit

Permalink
cs:fix
Browse files Browse the repository at this point in the history
Signed-off-by: MB-Finski <[email protected]>
  • Loading branch information
MB-Finski committed Jan 11, 2024
1 parent bb510de commit 4ae9763
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
11 changes: 5 additions & 6 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

use OCA\TPAssistant\Listener\BeforeTemplateRenderedListener;
use OCA\TPAssistant\Listener\FreePrompt\FreePromptReferenceListener;
use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextReferenceListener;
use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextResultListener;
use OCA\TPAssistant\Listener\TaskFailedListener;
use OCA\TPAssistant\Listener\TaskSuccessfulListener;
use OCA\TPAssistant\Listener\Text2Image\Text2ImageReferenceListener;
use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextResultListener;
use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextReferenceListener;
use OCA\TPAssistant\Reference\SpeechToTextReferenceProvider;
use OCA\TPAssistant\Listener\Text2Image\Text2ImageResultListener;
use OCA\TPAssistant\Notification\Notifier;
use OCA\TPAssistant\Reference\FreePromptReferenceProvider;
use OCA\TPAssistant\Reference\SpeechToTextReferenceProvider;
use OCA\TPAssistant\Reference\Text2ImageReferenceProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
Expand All @@ -21,13 +21,12 @@
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\SpeechToText\Events\TranscriptionFailedEvent;
use OCP\SpeechToText\Events\TranscriptionSuccessfulEvent;
use OCP\TextProcessing\Events\TaskFailedEvent as TextTaskFailedEvent;
use OCP\TextProcessing\Events\TaskSuccessfulEvent as TextTaskSuccessfulEvent;
use OCP\TextToImage\Events\TaskFailedEvent as TextToImageTaskFailedEvent;
use OCP\TextToImage\Events\TaskSuccessfulEvent as TextToImageTaskSuccessfulEvent;
use OCP\SpeechToText\Events\TranscriptionFailedEvent;
use OCP\SpeechToText\Events\TranscriptionSuccessfulEvent;


class Application extends App implements IBootstrap {

Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/SpeechToTextController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

namespace OCA\TPAssistant\Controller;
namespace OCA\TPAssistant\Controller;

use DateTime;
use Exception;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/SpeechToText/TranscriptMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
*/

namespace OCA\TPAssistant\Db\SpeechToText;
namespace OCA\TPAssistant\Db\SpeechToText;

use DateTime;
use Exception;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
use OCP\IConfig;
use OCP\SpeechToText\ISpeechToTextManager;
use OCP\Util;

/**
* @template-implements IEventListener<Event>
Expand Down
5 changes: 2 additions & 3 deletions lib/Listener/SpeechToText/SpeechToTextResultListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

namespace OCA\TPAssistant\Listener\SpeechToText;

use DateTime;
use OCA\TPAssistant\AppInfo\Application;
use OCA\TPAssistant\Service\SpeechToText\SpeechToTextService;
use OCP\EventDispatcher\Event;
Expand Down Expand Up @@ -52,7 +51,7 @@ public function handle(Event $event): void {
$userId = $event->getUserId();

try {
$this->sttService->sendSpeechToTextNotification($userId, $transcript,true);
$this->sttService->sendSpeechToTextNotification($userId, $transcript, true);
} catch (\InvalidArgumentException $e) {
$this->logger->error('Failed to dispatch notification for successful transcription: ' . $e->getMessage());
}
Expand All @@ -63,7 +62,7 @@ public function handle(Event $event): void {
$this->logger->error('Transcript generation failed: ' . $event->getErrorMessage());

try {
$this->sttService->sendSpeechToTextNotification($userId, '',false);
$this->sttService->sendSpeechToTextNotification($userId, '', false);
} catch (\InvalidArgumentException $e) {
$this->logger->error('Failed to dispatch notification for failed transcription: ' . $e->getMessage());
}
Expand Down
3 changes: 1 addition & 2 deletions lib/Service/AssistantService.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
use DateTime;
use OCA\TPAssistant\AppInfo\Application;
use OCP\Common\Exception\NotFoundException;
use OCP\IURLGenerator;
use OCP\Notification\IManager as INotificationManager;
use OCP\PreConditionNotMetException;
use OCP\TextProcessing\IManager as ITextProcessingManager;
use OCP\TextProcessing\Task as TextProcessingTask;
use OCP\TextToImage\Task as TextToImageTask;
use OCP\Notification\IManager as INotificationManager;
use OCP\IURLGenerator;

class AssistantService {

Expand Down
2 changes: 1 addition & 1 deletion lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\Settings\ISettings;
use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextProcessing\FreePromptTaskType;
use OCP\TextProcessing\IManager as ITextProcessingManager;
use OCP\SpeechToText\ISpeechToTextManager;

use OCP\TextToImage\IManager as ITextToImageManager;

Expand Down
4 changes: 2 additions & 2 deletions lib/Settings/Personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\Settings\ISettings;
use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextProcessing\FreePromptTaskType;
use OCP\TextProcessing\IManager as ITextProcessingManager;
use OCP\SpeechToText\ISpeechToTextManager;

use OCP\TextToImage\IManager;

Expand All @@ -22,7 +22,7 @@ public function __construct(
private IManager $textToImageManager,
private ITextProcessingManager $textProcessingManager,
private ISpeechToTextManager $speechToTextManager,
) {
) {
}

/**
Expand Down

0 comments on commit 4ae9763

Please sign in to comment.