Skip to content

Commit

Permalink
Update AnalyticsDatasource.php
Browse files Browse the repository at this point in the history
Signed-off-by: Rello <[email protected]>
  • Loading branch information
Rello authored Jun 1, 2024
1 parent f81937e commit a5614d0
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions lib/Datasource/AnalyticsDatasource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,38 @@
namespace OCA\Forms\Datasource;

use OCA\Analytics\Datasource\IDatasource;
use OCP\IL10N;
use Psr\Log\LoggerInterface;
use OCA\Forms\Db\FormMapper;
use OCA\Forms\Service\FormsService;
use OCA\Forms\Service\SubmissionService;
use OCP\IL10N;
use Psr\Log\LoggerInterface;

class AnalyticsDatasource implements IDatasource
{
private LoggerInterface $logger;
private IL10N $l10n;
class AnalyticsDatasource implements IDatasource {

Check failure on line 21 in lib/Datasource/AnalyticsDatasource.php

View workflow job for this annotation

GitHub Actions / Static analysis

UndefinedClass

lib/Datasource/AnalyticsDatasource.php:21:38: UndefinedClass: Class, interface or enum named OCA\Analytics\Datasource\IDatasource does not exist (see https://psalm.dev/019)
private LoggerInterface $logger;
private IL10N $l10n;
protected ?string $userId;

public function __construct(
IL10N $l10n,
LoggerInterface $logger,
?string $userId,
private FormMapper $formMapper,
private FormsService $formsService,
private SubmissionService $submissionService
)
{
$this->l10n = $l10n;
$this->logger = $logger;
$this->userId = $userId;
}

/**
* @return string Display Name of the datasource
*/
public function getName(): string
{
return $this->l10n->t('Nextcloud Forms');
}
public function __construct(

Check warning on line 26 in lib/Datasource/AnalyticsDatasource.php

View check run for this annotation

Codecov / codecov/patch

lib/Datasource/AnalyticsDatasource.php#L26

Added line #L26 was not covered by tests
IL10N $l10n,
LoggerInterface $logger,
?string $userId,
private FormMapper $formMapper,
private FormsService $formsService,
private SubmissionService $submissionService
)
{
$this->l10n = $l10n;
$this->logger = $logger;
$this->userId = $userId;

Check warning on line 37 in lib/Datasource/AnalyticsDatasource.php

View check run for this annotation

Codecov / codecov/patch

lib/Datasource/AnalyticsDatasource.php#L35-L37

Added lines #L35 - L37 were not covered by tests
}

/**
* @return string Display Name of the datasource
*/
public function getName(): string

Check warning on line 43 in lib/Datasource/AnalyticsDatasource.php

View check run for this annotation

Codecov / codecov/patch

lib/Datasource/AnalyticsDatasource.php#L43

Added line #L43 was not covered by tests
{
return $this->l10n->t('Nextcloud Forms');

Check warning on line 45 in lib/Datasource/AnalyticsDatasource.php

View check run for this annotation

Codecov / codecov/patch

lib/Datasource/AnalyticsDatasource.php#L45

Added line #L45 was not covered by tests
}

/**
* @return int 2 digit unique datasource id
Expand Down

0 comments on commit a5614d0

Please sign in to comment.