Fixed invalid imports after class refactoring

This commit is contained in:
Alejandro Celaya 2020-05-08 10:29:24 +02:00
parent 9a78fd1a26
commit 06c59fe2dd
11 changed files with 20 additions and 17 deletions

View File

@ -11,6 +11,7 @@ use Laminas\ServiceManager\Factory\InvokableFactory;
use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
use Shlinkio\Shlink\Common\Doctrine\NoDbNameConnectionFactory;
use Shlinkio\Shlink\Core\Service;
use Shlinkio\Shlink\Core\Tag\TagService;
use Shlinkio\Shlink\Core\Visit;
use Shlinkio\Shlink\Installer\Factory\ProcessHelperFactory;
use Shlinkio\Shlink\IpGeolocation\GeoLite2\DbUpdater;
@ -78,10 +79,10 @@ return [
Command\Api\DisableKeyCommand::class => [ApiKeyService::class],
Command\Api\ListKeysCommand::class => [ApiKeyService::class],
Command\Tag\ListTagsCommand::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Command\Tag\CreateTagCommand::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Command\Tag\RenameTagCommand::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Command\Tag\DeleteTagsCommand::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Command\Tag\ListTagsCommand::class => [TagService::class],
Command\Tag\CreateTagCommand::class => [TagService::class],
Command\Tag\RenameTagCommand::class => [TagService::class],
Command\Tag\DeleteTagsCommand::class => [TagService::class],
Command\Db\CreateDatabaseCommand::class => [
LockFactory::class,

View File

@ -16,9 +16,9 @@ class DeleteTagsCommand extends Command
{
public const NAME = 'tag:delete';
private \Shlinkio\Shlink\Core\Tag\TagServiceInterface $tagService;
private TagServiceInterface $tagService;
public function __construct(\Shlinkio\Shlink\Core\Tag\TagServiceInterface $tagService)
public function __construct(TagServiceInterface $tagService)
{
parent::__construct();
$this->tagService = $tagService;

View File

@ -20,7 +20,7 @@ class RenameTagCommand extends Command
private TagServiceInterface $tagService;
public function __construct(\Shlinkio\Shlink\Core\Tag\TagServiceInterface $tagService)
public function __construct(TagServiceInterface $tagService)
{
parent::__construct();
$this->tagService = $tagService;

View File

@ -18,7 +18,7 @@ class DeleteTagsCommandTest extends TestCase
public function setUp(): void
{
$this->tagService = $this->prophesize(\Shlinkio\Shlink\Core\Tag\TagServiceInterface::class);
$this->tagService = $this->prophesize(TagServiceInterface::class);
$command = new DeleteTagsCommand($this->tagService->reveal());
$app = new Application();

View File

@ -19,7 +19,7 @@ class ListTagsCommandTest extends TestCase
public function setUp(): void
{
$this->tagService = $this->prophesize(\Shlinkio\Shlink\Core\Tag\TagServiceInterface::class);
$this->tagService = $this->prophesize(TagServiceInterface::class);
$command = new ListTagsCommand($this->tagService->reveal());
$app = new Application();

View File

@ -7,6 +7,7 @@ namespace Shlinkio\Shlink\Core\Repository;
use Doctrine\ORM\EntityRepository;
use Shlinkio\Shlink\Core\Entity\Tag;
use Shlinkio\Shlink\Core\Tag\Model\TagInfo;
use function Functional\map;
class TagRepository extends EntityRepository implements TagRepositoryInterface

View File

@ -10,6 +10,7 @@ use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
use Shlinkio\Shlink\Common\Mercure\LcobucciJwtProvider;
use Shlinkio\Shlink\Core\Options\AppOptions;
use Shlinkio\Shlink\Core\Service;
use Shlinkio\Shlink\Core\Tag\TagService;
use Shlinkio\Shlink\Core\Visit;
use Shlinkio\Shlink\Rest\Service\ApiKeyService;
@ -65,10 +66,10 @@ return [
Action\Visit\GlobalVisitsAction::class => [Visit\VisitsStatsHelper::class],
Action\ShortUrl\ListShortUrlsAction::class => [Service\ShortUrlService::class, 'config.url_shortener.domain'],
Action\ShortUrl\EditShortUrlTagsAction::class => [Service\ShortUrlService::class],
Action\Tag\ListTagsAction::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Action\Tag\DeleteTagsAction::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Action\Tag\CreateTagsAction::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Action\Tag\UpdateTagAction::class => [\Shlinkio\Shlink\Core\Tag\TagService::class],
Action\Tag\ListTagsAction::class => [TagService::class],
Action\Tag\DeleteTagsAction::class => [TagService::class],
Action\Tag\CreateTagsAction::class => [TagService::class],
Action\Tag\UpdateTagAction::class => [TagService::class],
Middleware\ShortUrl\DropDefaultDomainFromRequestMiddleware::class => ['config.url_shortener.domain.hostname'],
Middleware\ShortUrl\DefaultShortCodesLengthMiddleware::class => [

View File

@ -17,7 +17,7 @@ class DeleteTagsAction extends AbstractRestAction
private TagServiceInterface $tagService;
public function __construct(\Shlinkio\Shlink\Core\Tag\TagServiceInterface $tagService)
public function __construct(TagServiceInterface $tagService)
{
$this->tagService = $tagService;
}

View File

@ -16,7 +16,7 @@ class UpdateTagAction extends AbstractRestAction
protected const ROUTE_PATH = '/tags';
protected const ROUTE_ALLOWED_METHODS = [self::METHOD_PUT];
private \Shlinkio\Shlink\Core\Tag\TagServiceInterface $tagService;
private TagServiceInterface $tagService;
public function __construct(TagServiceInterface $tagService)
{

View File

@ -20,7 +20,7 @@ class ListTagsActionTest extends TestCase
public function setUp(): void
{
$this->tagService = $this->prophesize(\Shlinkio\Shlink\Core\Tag\TagServiceInterface::class);
$this->tagService = $this->prophesize(TagServiceInterface::class);
$this->action = new ListTagsAction($this->tagService->reveal());
}

View File

@ -19,7 +19,7 @@ class UpdateTagActionTest extends TestCase
public function setUp(): void
{
$this->tagService = $this->prophesize(\Shlinkio\Shlink\Core\Tag\TagServiceInterface::class);
$this->tagService = $this->prophesize(TagServiceInterface::class);
$this->action = new UpdateTagAction($this->tagService->reveal());
}