mirror of
https://github.com/shlinkio/shlink.git
synced 2025-01-21 22:13:15 -06:00
Enforced property types comments in one line
This commit is contained in:
parent
15a70d0157
commit
0ae5a53d86
@ -16,9 +16,7 @@ class DisableKeyCommand extends Command
|
||||
{
|
||||
public const NAME = 'api-key:disable';
|
||||
|
||||
/**
|
||||
* @var ApiKeyServiceInterface
|
||||
*/
|
||||
/** @var ApiKeyServiceInterface */
|
||||
private $apiKeyService;
|
||||
|
||||
public function __construct(ApiKeyServiceInterface $apiKeyService)
|
||||
|
@ -16,9 +16,7 @@ class GenerateKeyCommand extends Command
|
||||
{
|
||||
public const NAME = 'api-key:generate';
|
||||
|
||||
/**
|
||||
* @var ApiKeyServiceInterface
|
||||
*/
|
||||
/** @var ApiKeyServiceInterface */
|
||||
private $apiKeyService;
|
||||
|
||||
public function __construct(ApiKeyServiceInterface $apiKeyService)
|
||||
|
@ -22,9 +22,7 @@ class ListKeysCommand extends Command
|
||||
|
||||
public const NAME = 'api-key:list';
|
||||
|
||||
/**
|
||||
* @var ApiKeyServiceInterface
|
||||
*/
|
||||
/** @var ApiKeyServiceInterface */
|
||||
private $apiKeyService;
|
||||
|
||||
public function __construct(ApiKeyServiceInterface $apiKeyService)
|
||||
|
@ -18,9 +18,7 @@ class DeleteShortUrlCommand extends Command
|
||||
public const NAME = 'short-url:delete';
|
||||
private const ALIASES = ['short-code:delete'];
|
||||
|
||||
/**
|
||||
* @var DeleteShortUrlServiceInterface
|
||||
*/
|
||||
/** @var DeleteShortUrlServiceInterface */
|
||||
private $deleteShortUrlService;
|
||||
|
||||
public function __construct(DeleteShortUrlServiceInterface $deleteShortUrlService)
|
||||
|
@ -17,13 +17,9 @@ class GeneratePreviewCommand extends Command
|
||||
public const NAME = 'short-url:process-previews';
|
||||
private const ALIASES = ['shortcode:process-previews', 'short-code:process-previews'];
|
||||
|
||||
/**
|
||||
* @var PreviewGeneratorInterface
|
||||
*/
|
||||
/** @var PreviewGeneratorInterface */
|
||||
private $previewGenerator;
|
||||
/**
|
||||
* @var ShortUrlServiceInterface
|
||||
*/
|
||||
/** @var ShortUrlServiceInterface */
|
||||
private $shortUrlService;
|
||||
|
||||
public function __construct(ShortUrlServiceInterface $shortUrlService, PreviewGeneratorInterface $previewGenerator)
|
||||
|
@ -26,13 +26,9 @@ class GenerateShortUrlCommand extends Command
|
||||
public const NAME = 'short-url:generate';
|
||||
private const ALIASES = ['shortcode:generate', 'short-code:generate'];
|
||||
|
||||
/**
|
||||
* @var UrlShortenerInterface
|
||||
*/
|
||||
/** @var UrlShortenerInterface */
|
||||
private $urlShortener;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $domainConfig;
|
||||
|
||||
public function __construct(UrlShortenerInterface $urlShortener, array $domainConfig)
|
||||
|
@ -21,9 +21,7 @@ class GetVisitsCommand extends Command
|
||||
public const NAME = 'short-url:visits';
|
||||
private const ALIASES = ['shortcode:visits', 'short-code:visits'];
|
||||
|
||||
/**
|
||||
* @var VisitsTrackerInterface
|
||||
*/
|
||||
/** @var VisitsTrackerInterface */
|
||||
private $visitsTracker;
|
||||
|
||||
public function __construct(VisitsTrackerInterface $visitsTracker)
|
||||
|
@ -25,13 +25,9 @@ class ListShortUrlsCommand extends Command
|
||||
public const NAME = 'short-url:list';
|
||||
private const ALIASES = ['shortcode:list', 'short-code:list'];
|
||||
|
||||
/**
|
||||
* @var ShortUrlServiceInterface
|
||||
*/
|
||||
/** @var ShortUrlServiceInterface */
|
||||
private $shortUrlService;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $domainConfig;
|
||||
|
||||
public function __construct(ShortUrlServiceInterface $shortUrlService, array $domainConfig)
|
||||
|
@ -18,9 +18,7 @@ class ResolveUrlCommand extends Command
|
||||
public const NAME = 'short-url:parse';
|
||||
private const ALIASES = ['shortcode:parse', 'short-code:parse'];
|
||||
|
||||
/**
|
||||
* @var UrlShortenerInterface
|
||||
*/
|
||||
/** @var UrlShortenerInterface */
|
||||
private $urlShortener;
|
||||
|
||||
public function __construct(UrlShortenerInterface $urlShortener)
|
||||
|
@ -14,9 +14,7 @@ class CreateTagCommand extends Command
|
||||
{
|
||||
public const NAME = 'tag:create';
|
||||
|
||||
/**
|
||||
* @var TagServiceInterface
|
||||
*/
|
||||
/** @var TagServiceInterface */
|
||||
private $tagService;
|
||||
|
||||
public function __construct(TagServiceInterface $tagService)
|
||||
|
@ -14,9 +14,7 @@ class DeleteTagsCommand extends Command
|
||||
{
|
||||
public const NAME = 'tag:delete';
|
||||
|
||||
/**
|
||||
* @var TagServiceInterface
|
||||
*/
|
||||
/** @var TagServiceInterface */
|
||||
private $tagService;
|
||||
|
||||
public function __construct(TagServiceInterface $tagService)
|
||||
|
@ -15,9 +15,7 @@ class ListTagsCommand extends Command
|
||||
{
|
||||
public const NAME = 'tag:list';
|
||||
|
||||
/**
|
||||
* @var TagServiceInterface
|
||||
*/
|
||||
/** @var TagServiceInterface */
|
||||
private $tagService;
|
||||
|
||||
public function __construct(TagServiceInterface $tagService)
|
||||
|
@ -16,9 +16,7 @@ class RenameTagCommand extends Command
|
||||
{
|
||||
public const NAME = 'tag:rename';
|
||||
|
||||
/**
|
||||
* @var TagServiceInterface
|
||||
*/
|
||||
/** @var TagServiceInterface */
|
||||
private $tagService;
|
||||
|
||||
public function __construct(TagServiceInterface $tagService)
|
||||
|
@ -21,21 +21,13 @@ class ProcessVisitsCommand extends Command
|
||||
{
|
||||
public const NAME = 'visit:process';
|
||||
|
||||
/**
|
||||
* @var VisitServiceInterface
|
||||
*/
|
||||
/** @var VisitServiceInterface */
|
||||
private $visitService;
|
||||
/**
|
||||
* @var IpLocationResolverInterface
|
||||
*/
|
||||
/** @var IpLocationResolverInterface */
|
||||
private $ipLocationResolver;
|
||||
/**
|
||||
* @var Locker
|
||||
*/
|
||||
/** @var Locker */
|
||||
private $locker;
|
||||
/**
|
||||
* @var OutputInterface
|
||||
*/
|
||||
/** @var OutputInterface */
|
||||
private $output;
|
||||
|
||||
public function __construct(
|
||||
|
@ -15,9 +15,7 @@ class UpdateDbCommand extends Command
|
||||
{
|
||||
public const NAME = 'visit:update-db';
|
||||
|
||||
/**
|
||||
* @var DbUpdaterInterface
|
||||
*/
|
||||
/** @var DbUpdaterInterface */
|
||||
private $geoLiteDbUpdater;
|
||||
|
||||
public function __construct(DbUpdaterInterface $geoLiteDbUpdater)
|
||||
|
@ -13,13 +13,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class DisableKeyCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -15,13 +15,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class GenerateKeyCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -13,13 +13,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class ListKeysCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $apiKeyService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -13,9 +13,7 @@ use function str_split;
|
||||
|
||||
class GenerateCharsetCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,13 +16,9 @@ use function sprintf;
|
||||
|
||||
class DeleteShortCodeCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $service;
|
||||
|
||||
public function setUp()
|
||||
|
@ -20,17 +20,11 @@ use function substr_count;
|
||||
|
||||
class GeneratePreviewCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $previewGenerator;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -17,13 +17,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class GenerateShortUrlCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
|
@ -20,13 +20,9 @@ use function strpos;
|
||||
|
||||
class GetVisitsCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $visitsTracker;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,13 +16,9 @@ use Zend\Paginator\Paginator;
|
||||
|
||||
class ListShortUrlsCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $shortUrlService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,13 +16,9 @@ use const PHP_EOL;
|
||||
|
||||
class ResolveUrlCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
protected $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
|
@ -14,13 +14,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class CreateTagCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -13,17 +13,11 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class DeleteTagsCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var DeleteTagsCommand
|
||||
*/
|
||||
/** @var DeleteTagsCommand */
|
||||
private $command;
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -14,17 +14,11 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class ListTagsCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ListTagsCommand
|
||||
*/
|
||||
/** @var ListTagsCommand */
|
||||
private $command;
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -15,17 +15,11 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class RenameTagCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var RenameTagCommand
|
||||
*/
|
||||
/** @var RenameTagCommand */
|
||||
private $command;
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $tagService;
|
||||
|
||||
public function setUp()
|
||||
|
@ -26,25 +26,15 @@ use function sprintf;
|
||||
|
||||
class ProcessVisitsCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $visitService;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $ipResolver;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $locker;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $lock;
|
||||
|
||||
public function setUp()
|
||||
|
@ -14,13 +14,9 @@ use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class UpdateDbCommandTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CommandTester
|
||||
*/
|
||||
/** @var CommandTester */
|
||||
private $commandTester;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $dbUpdater;
|
||||
|
||||
public function setUp()
|
||||
|
@ -8,9 +8,7 @@ use Shlinkio\Shlink\CLI\ConfigProvider;
|
||||
|
||||
class ConfigProviderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ConfigProvider
|
||||
*/
|
||||
/** @var ConfigProvider */
|
||||
protected $configProvider;
|
||||
|
||||
public function setUp()
|
||||
|
@ -15,9 +15,7 @@ use function array_merge;
|
||||
|
||||
class ApplicationFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ApplicationFactory
|
||||
*/
|
||||
/** @var ApplicationFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -9,9 +9,7 @@ use function is_array;
|
||||
|
||||
final class PathCollection
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $array;
|
||||
|
||||
public function __construct(array $array)
|
||||
|
@ -7,9 +7,7 @@ use Shlinkio\Shlink\Common\Exception\WrongIpException;
|
||||
|
||||
class ChainIpLocationResolver implements IpLocationResolverInterface
|
||||
{
|
||||
/**
|
||||
* @var IpLocationResolverInterface[]
|
||||
*/
|
||||
/** @var IpLocationResolverInterface[] */
|
||||
private $resolvers;
|
||||
|
||||
public function __construct(IpLocationResolverInterface ...$resolvers)
|
||||
|
@ -19,17 +19,11 @@ class DbUpdater implements DbUpdaterInterface
|
||||
private const DB_COMPRESSED_FILE = 'GeoLite2-City.tar.gz';
|
||||
private const DB_DECOMPRESSED_FILE = 'GeoLite2-City.mmdb';
|
||||
|
||||
/**
|
||||
* @var ClientInterface
|
||||
*/
|
||||
/** @var ClientInterface */
|
||||
private $httpClient;
|
||||
/**
|
||||
* @var Filesystem
|
||||
*/
|
||||
/** @var Filesystem */
|
||||
private $filesystem;
|
||||
/**
|
||||
* @var GeoLite2Options
|
||||
*/
|
||||
/** @var GeoLite2Options */
|
||||
private $options;
|
||||
|
||||
public function __construct(ClientInterface $httpClient, Filesystem $filesystem, GeoLite2Options $options)
|
||||
|
@ -13,9 +13,7 @@ use function Functional\first;
|
||||
|
||||
class GeoLite2LocationResolver implements IpLocationResolverInterface
|
||||
{
|
||||
/**
|
||||
* @var Reader
|
||||
*/
|
||||
/** @var Reader */
|
||||
private $geoLiteDbReader;
|
||||
|
||||
public function __construct(Reader $geoLiteDbReader)
|
||||
|
@ -14,9 +14,7 @@ class IpApiLocationResolver implements IpLocationResolverInterface
|
||||
{
|
||||
private const SERVICE_PATTERN = 'http://ip-api.com/json/%s';
|
||||
|
||||
/**
|
||||
* @var Client
|
||||
*/
|
||||
/** @var Client */
|
||||
private $httpClient;
|
||||
|
||||
public function __construct(Client $httpClient)
|
||||
|
@ -15,9 +15,7 @@ class LocaleMiddleware implements MiddlewareInterface
|
||||
{
|
||||
private const ACCEPT_LANGUAGE = 'Accept-Language';
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
*/
|
||||
/** @var Translator */
|
||||
private $translator;
|
||||
|
||||
public function __construct(Translator $translator)
|
||||
|
@ -12,21 +12,13 @@ class PaginableRepositoryAdapter implements AdapterInterface
|
||||
{
|
||||
public const ITEMS_PER_PAGE = 10;
|
||||
|
||||
/**
|
||||
* @var PaginableRepositoryInterface
|
||||
*/
|
||||
/** @var PaginableRepositoryInterface */
|
||||
private $paginableRepository;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
/** @var null|string */
|
||||
private $searchTerm;
|
||||
/**
|
||||
* @var null|array|string
|
||||
*/
|
||||
/** @var null|array|string */
|
||||
private $orderBy;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $tags;
|
||||
|
||||
public function __construct(
|
||||
|
@ -12,17 +12,11 @@ use function urlencode;
|
||||
|
||||
class PreviewGenerator implements PreviewGeneratorInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $location;
|
||||
/**
|
||||
* @var ImageBuilderInterface
|
||||
*/
|
||||
/** @var ImageBuilderInterface */
|
||||
private $imageBuilder;
|
||||
/**
|
||||
* @var Filesystem
|
||||
*/
|
||||
/** @var Filesystem */
|
||||
private $filesystem;
|
||||
|
||||
public function __construct(ImageBuilderInterface $imageBuilder, Filesystem $filesystem, $location)
|
||||
|
@ -9,9 +9,7 @@ use Zend\I18n\Translator\TranslatorInterface;
|
||||
|
||||
class TranslatorExtension implements ExtensionInterface
|
||||
{
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
/** @var TranslatorInterface */
|
||||
private $translator;
|
||||
|
||||
public function __construct(TranslatorInterface $translator)
|
||||
|
@ -7,13 +7,9 @@ use Cake\Chronos\Chronos;
|
||||
|
||||
final class DateRange
|
||||
{
|
||||
/**
|
||||
* @var Chronos|null
|
||||
*/
|
||||
/** @var Chronos|null */
|
||||
private $startDate;
|
||||
/**
|
||||
* @var Chronos|null
|
||||
*/
|
||||
/** @var Chronos|null */
|
||||
private $endDate;
|
||||
|
||||
public function __construct(?Chronos $startDate = null, ?Chronos $endDate = null)
|
||||
|
@ -15,21 +15,13 @@ final class IpAddress
|
||||
private const OBFUSCATED_OCTET = '0';
|
||||
public const LOCALHOST = '127.0.0.1';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $firstOctet;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $secondOctet;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $thirdOctet;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $fourthOctet;
|
||||
|
||||
private function __construct(string $firstOctet, string $secondOctet, string $thirdOctet, string $fourthOctet)
|
||||
|
@ -10,9 +10,7 @@ abstract class DatabaseTestCase extends TestCase
|
||||
{
|
||||
protected const ENTITIES_TO_EMPTY = [];
|
||||
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
/** @var EntityManagerInterface */
|
||||
public static $em;
|
||||
|
||||
protected function getEntityManager(): EntityManagerInterface
|
||||
|
@ -8,9 +8,7 @@ use Shlinkio\Shlink\Common\Collection\PathCollection;
|
||||
|
||||
class PathCollectionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PathCollection
|
||||
*/
|
||||
/** @var PathCollection */
|
||||
private $collection;
|
||||
|
||||
public function setUp()
|
||||
|
@ -8,9 +8,7 @@ use Shlinkio\Shlink\Common\ConfigProvider;
|
||||
|
||||
class ConfigProviderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ConfigProvider
|
||||
*/
|
||||
/** @var ConfigProvider */
|
||||
protected $configProvider;
|
||||
|
||||
public function setUp()
|
||||
|
@ -19,9 +19,7 @@ use function sys_get_temp_dir;
|
||||
|
||||
class CacheFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var CacheFactory
|
||||
*/
|
||||
/** @var CacheFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,9 +11,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class DottedAccessConfigAbstractFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var DottedAccessConfigAbstractFactory
|
||||
*/
|
||||
/** @var DottedAccessConfigAbstractFactory */
|
||||
private $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -12,9 +12,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class EmptyResponseImplicitOptionsMiddlewareFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var EmptyResponseImplicitOptionsMiddlewareFactory
|
||||
*/
|
||||
/** @var EmptyResponseImplicitOptionsMiddlewareFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -10,9 +10,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class EntityManagerFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerFactory
|
||||
*/
|
||||
/** @var EntityManagerFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,9 +11,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class LoggerFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var LoggerFactory
|
||||
*/
|
||||
/** @var LoggerFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -10,9 +10,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class TranslatorFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TranslatorFactory
|
||||
*/
|
||||
/** @var TranslatorFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -10,9 +10,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class ImageBuilderFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ImageBuilderFactory
|
||||
*/
|
||||
/** @var ImageBuilderFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,9 +11,7 @@ use Zend\ServiceManager\ServiceManager;
|
||||
|
||||
class ImageFactoryTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ImageFactory
|
||||
*/
|
||||
/** @var ImageFactory */
|
||||
protected $factory;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,17 +11,11 @@ use Shlinkio\Shlink\Common\IpGeolocation\IpLocationResolverInterface;
|
||||
|
||||
class ChainIpLocationResolverTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ChainIpLocationResolver
|
||||
*/
|
||||
/** @var ChainIpLocationResolver */
|
||||
private $resolver;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $firstInnerResolver;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $secondInnerResolver;
|
||||
|
||||
public function setUp()
|
||||
|
@ -23,9 +23,7 @@ class EmptyIpLocationResolverTest extends TestCase
|
||||
'time_zone' => '',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var EmptyIpLocationResolver
|
||||
*/
|
||||
/** @var EmptyIpLocationResolver */
|
||||
private $resolver;
|
||||
|
||||
public function setUp()
|
||||
|
@ -17,21 +17,13 @@ use Zend\Diactoros\Response;
|
||||
|
||||
class DbUpdaterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var DbUpdater
|
||||
*/
|
||||
/** @var DbUpdater */
|
||||
private $dbUpdater;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $httpClient;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $filesystem;
|
||||
/**
|
||||
* @var GeoLite2Options
|
||||
*/
|
||||
/** @var GeoLite2Options */
|
||||
private $options;
|
||||
|
||||
public function setUp()
|
||||
|
@ -14,13 +14,9 @@ use Shlinkio\Shlink\Common\IpGeolocation\GeoLite2LocationResolver;
|
||||
|
||||
class GeoLite2LocationResolverTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var GeoLite2LocationResolver
|
||||
*/
|
||||
/** @var GeoLite2LocationResolver */
|
||||
private $resolver;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $reader;
|
||||
|
||||
public function setUp()
|
||||
|
@ -13,13 +13,9 @@ use function json_encode;
|
||||
|
||||
class IpApiLocationResolverTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var IpApiLocationResolver
|
||||
*/
|
||||
/** @var IpApiLocationResolver */
|
||||
protected $ipResolver;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $client;
|
||||
|
||||
public function setUp()
|
||||
|
@ -9,9 +9,7 @@ use const PHP_EOL;
|
||||
|
||||
class ExceptionWithNewLineProcessorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ExceptionWithNewLineProcessor
|
||||
*/
|
||||
/** @var ExceptionWithNewLineProcessor */
|
||||
private $processor;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,13 +11,9 @@ use Zend\I18n\Translator\Translator;
|
||||
|
||||
class LocaleMiddlewareTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var LocaleMiddleware
|
||||
*/
|
||||
/** @var LocaleMiddleware */
|
||||
protected $middleware;
|
||||
/**
|
||||
* @var Translator
|
||||
*/
|
||||
/** @var Translator */
|
||||
protected $translator;
|
||||
|
||||
public function setUp()
|
||||
|
@ -10,13 +10,9 @@ use Shlinkio\Shlink\Common\Repository\PaginableRepositoryInterface;
|
||||
|
||||
class PaginableRepositoryAdapterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PaginableRepositoryAdapter
|
||||
*/
|
||||
/** @var PaginableRepositoryAdapter */
|
||||
protected $adapter;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $repo;
|
||||
|
||||
public function setUp()
|
||||
|
@ -8,9 +8,7 @@ use Shlinkio\Shlink\Common\Response\PixelResponse;
|
||||
|
||||
class PixelResponseTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PixelResponse
|
||||
*/
|
||||
/** @var PixelResponse */
|
||||
private $resp;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,17 +16,11 @@ use function urlencode;
|
||||
|
||||
class PreviewGeneratorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PreviewGenerator
|
||||
*/
|
||||
/** @var PreviewGenerator */
|
||||
protected $generator;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $image;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $filesystem;
|
||||
|
||||
public function setUp()
|
||||
|
@ -11,9 +11,7 @@ use Zend\I18n\Translator\Translator;
|
||||
|
||||
class TranslatorExtensionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TranslatorExtension
|
||||
*/
|
||||
/** @var TranslatorExtension */
|
||||
protected $extension;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,9 +16,7 @@ use stdClass;
|
||||
|
||||
class ChronosDateTimeTypeTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ChronosDateTimeType
|
||||
*/
|
||||
/** @var ChronosDateTimeType */
|
||||
private $type;
|
||||
|
||||
public function setUp()
|
||||
|
@ -19,21 +19,13 @@ use function array_key_exists;
|
||||
|
||||
abstract class AbstractTrackingAction implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* @var UrlShortenerInterface
|
||||
*/
|
||||
/** @var UrlShortenerInterface */
|
||||
private $urlShortener;
|
||||
/**
|
||||
* @var VisitsTrackerInterface
|
||||
*/
|
||||
/** @var VisitsTrackerInterface */
|
||||
private $visitTracker;
|
||||
/**
|
||||
* @var AppOptions
|
||||
*/
|
||||
/** @var AppOptions */
|
||||
private $appOptions;
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
public function __construct(
|
||||
|
@ -22,17 +22,11 @@ class PreviewAction implements MiddlewareInterface
|
||||
use ResponseUtilsTrait;
|
||||
use ErrorResponseBuilderTrait;
|
||||
|
||||
/**
|
||||
* @var PreviewGeneratorInterface
|
||||
*/
|
||||
/** @var PreviewGeneratorInterface */
|
||||
private $previewGenerator;
|
||||
/**
|
||||
* @var UrlShortenerInterface
|
||||
*/
|
||||
/** @var UrlShortenerInterface */
|
||||
private $urlShortener;
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
public function __construct(
|
||||
|
@ -26,17 +26,11 @@ class QrCodeAction implements MiddlewareInterface
|
||||
private const MIN_SIZE = 50;
|
||||
private const MAX_SIZE = 1000;
|
||||
|
||||
/**
|
||||
* @var RouterInterface
|
||||
*/
|
||||
/** @var RouterInterface */
|
||||
private $router;
|
||||
/**
|
||||
* @var UrlShortenerInterface
|
||||
*/
|
||||
/** @var UrlShortenerInterface */
|
||||
private $urlShortener;
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
public function __construct(
|
||||
|
@ -17,9 +17,7 @@ class RedirectAction extends AbstractTrackingAction
|
||||
{
|
||||
use ErrorResponseBuilderTrait;
|
||||
|
||||
/**
|
||||
* @var Options\NotFoundShortUrlOptions
|
||||
*/
|
||||
/** @var Options\NotFoundShortUrlOptions */
|
||||
private $notFoundOptions;
|
||||
|
||||
public function __construct(
|
||||
|
@ -8,9 +8,7 @@ use function sprintf;
|
||||
|
||||
class DeleteShortUrlException extends RuntimeException
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
/** @var int */
|
||||
private $visitsThreshold;
|
||||
|
||||
public function __construct(int $visitsThreshold, string $message = '', int $code = 0, Throwable $previous = null)
|
||||
|
@ -12,9 +12,7 @@ use function sprintf;
|
||||
|
||||
class ValidationException extends RuntimeException
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $invalidElements;
|
||||
|
||||
public function __construct(
|
||||
|
@ -12,9 +12,7 @@ use Zend\Diactoros\Response as DiactResp;
|
||||
|
||||
class QrCodeCacheMiddleware implements MiddlewareInterface
|
||||
{
|
||||
/**
|
||||
* @var Cache
|
||||
*/
|
||||
/** @var Cache */
|
||||
private $cache;
|
||||
|
||||
public function __construct(Cache $cache)
|
||||
|
@ -7,17 +7,11 @@ use Psr\Http\Message\UriInterface;
|
||||
|
||||
final class CreateShortUrlData
|
||||
{
|
||||
/**
|
||||
* @var UriInterface
|
||||
*/
|
||||
/** @var UriInterface */
|
||||
private $longUrl;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $tags;
|
||||
/**
|
||||
* @var ShortUrlMeta
|
||||
*/
|
||||
/** @var ShortUrlMeta */
|
||||
private $meta;
|
||||
|
||||
public function __construct(
|
||||
|
@ -10,21 +10,13 @@ use function is_string;
|
||||
|
||||
final class ShortUrlMeta
|
||||
{
|
||||
/**
|
||||
* @var Chronos|null
|
||||
*/
|
||||
/** @var Chronos|null */
|
||||
private $validSince;
|
||||
/**
|
||||
* @var Chronos|null
|
||||
*/
|
||||
/** @var Chronos|null */
|
||||
private $validUntil;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
/** @var string|null */
|
||||
private $customSlug;
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
/** @var int|null */
|
||||
private $maxVisits;
|
||||
|
||||
// Force named constructors
|
||||
|
@ -9,17 +9,11 @@ final class Visitor
|
||||
{
|
||||
public const REMOTE_ADDRESS_ATTR = 'remote_address';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $userAgent;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $referer;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
/** @var string|null */
|
||||
private $remoteAddress;
|
||||
|
||||
public function __construct(string $userAgent, string $referer, ?string $remoteAddress)
|
||||
|
@ -11,21 +11,13 @@ class AppOptions extends AbstractOptions
|
||||
{
|
||||
use StringUtilsTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
protected $name = '';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
protected $version = '1.0';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
protected $secretKey = '';
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
/** @var string|null */
|
||||
protected $disableTrackParam;
|
||||
|
||||
/**
|
||||
|
@ -7,13 +7,9 @@ use Zend\Stdlib\AbstractOptions;
|
||||
|
||||
class NotFoundShortUrlOptions extends AbstractOptions
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool */
|
||||
private $enableRedirection = false;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
/** @var string|null */
|
||||
private $redirectTo;
|
||||
|
||||
public function isRedirectionEnabled(): bool
|
||||
|
@ -17,13 +17,9 @@ class NotFoundHandler implements RequestHandlerInterface
|
||||
{
|
||||
public const NOT_FOUND_TEMPLATE = 'notFoundTemplate';
|
||||
|
||||
/**
|
||||
* @var TemplateRendererInterface
|
||||
*/
|
||||
/** @var TemplateRendererInterface */
|
||||
private $renderer;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $defaultTemplate;
|
||||
|
||||
public function __construct(TemplateRendererInterface $renderer, string $defaultTemplate = 'ShlinkCore::error/404')
|
||||
|
@ -12,13 +12,9 @@ class DeleteShortUrlService implements DeleteShortUrlServiceInterface
|
||||
{
|
||||
use FindShortCodeTrait;
|
||||
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
/** @var EntityManagerInterface */
|
||||
private $em;
|
||||
/**
|
||||
* @var DeleteShortUrlsOptions
|
||||
*/
|
||||
/** @var DeleteShortUrlsOptions */
|
||||
private $deleteShortUrlsOptions;
|
||||
|
||||
public function __construct(EntityManagerInterface $em, DeleteShortUrlsOptions $deleteShortUrlsOptions)
|
||||
|
@ -18,9 +18,7 @@ class ShortUrlService implements ShortUrlServiceInterface
|
||||
use FindShortCodeTrait;
|
||||
use TagManagerTrait;
|
||||
|
||||
/**
|
||||
* @var ORM\EntityManagerInterface
|
||||
*/
|
||||
/** @var ORM\EntityManagerInterface */
|
||||
private $em;
|
||||
|
||||
public function __construct(ORM\EntityManagerInterface $em)
|
||||
|
@ -14,9 +14,7 @@ class TagService implements TagServiceInterface
|
||||
{
|
||||
use TagManagerTrait;
|
||||
|
||||
/**
|
||||
* @var ORM\EntityManagerInterface
|
||||
*/
|
||||
/** @var ORM\EntityManagerInterface */
|
||||
private $em;
|
||||
|
||||
public function __construct(ORM\EntityManagerInterface $em)
|
||||
|
@ -32,25 +32,15 @@ class UrlShortener implements UrlShortenerInterface
|
||||
public const DEFAULT_CHARS = '123456789bcdfghjkmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ';
|
||||
private const ID_INCREMENT = 200000;
|
||||
|
||||
/**
|
||||
* @var ClientInterface
|
||||
*/
|
||||
/** @var ClientInterface */
|
||||
private $httpClient;
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
/** @var EntityManagerInterface */
|
||||
private $em;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
private $chars;
|
||||
/**
|
||||
* @var SlugifyInterface
|
||||
*/
|
||||
/** @var SlugifyInterface */
|
||||
private $slugger;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
/** @var bool */
|
||||
private $urlValidationEnabled;
|
||||
|
||||
public function __construct(
|
||||
|
@ -11,9 +11,7 @@ use Shlinkio\Shlink\Core\Repository\VisitRepository;
|
||||
|
||||
class VisitService implements VisitServiceInterface
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
/** @var EntityManagerInterface */
|
||||
private $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
|
@ -14,9 +14,7 @@ use function sprintf;
|
||||
|
||||
class VisitsTracker implements VisitsTrackerInterface
|
||||
{
|
||||
/**
|
||||
* @var ORM\EntityManagerInterface
|
||||
*/
|
||||
/** @var ORM\EntityManagerInterface */
|
||||
private $em;
|
||||
|
||||
public function __construct(ORM\EntityManagerInterface $em)
|
||||
|
@ -12,9 +12,7 @@ class ShortUrlDataTransformer implements DataTransformerInterface
|
||||
{
|
||||
use ShortUrlBuilderTrait;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/** @var array */
|
||||
private $domainConfig;
|
||||
|
||||
public function __construct(array $domainConfig)
|
||||
|
@ -22,9 +22,7 @@ class ShortUrlRepositoryTest extends DatabaseTestCase
|
||||
Tag::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* @var ShortUrlRepository
|
||||
*/
|
||||
/** @var ShortUrlRepository */
|
||||
private $repo;
|
||||
|
||||
public function setUp()
|
||||
|
@ -13,9 +13,7 @@ class TagRepositoryTest extends DatabaseTestCase
|
||||
Tag::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* @var TagRepository
|
||||
*/
|
||||
/** @var TagRepository */
|
||||
private $repo;
|
||||
|
||||
protected function setUp()
|
||||
|
@ -21,9 +21,7 @@ class VisitRepositoryTest extends DatabaseTestCase
|
||||
ShortUrl::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* @var VisitRepository
|
||||
*/
|
||||
/** @var VisitRepository */
|
||||
private $repo;
|
||||
|
||||
protected function setUp()
|
||||
|
@ -18,17 +18,11 @@ use Zend\Diactoros\ServerRequestFactory;
|
||||
|
||||
class PixelActionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var RedirectAction
|
||||
*/
|
||||
/** @var RedirectAction */
|
||||
protected $action;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $urlShortener;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $visitTracker;
|
||||
|
||||
public function setUp()
|
||||
|
@ -23,17 +23,11 @@ use function filesize;
|
||||
|
||||
class PreviewActionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var PreviewAction
|
||||
*/
|
||||
/** @var PreviewAction */
|
||||
protected $action;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $previewGenerator;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
|
@ -20,13 +20,9 @@ use Zend\Expressive\Router\RouterInterface;
|
||||
|
||||
class QrCodeActionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var QrCodeAction
|
||||
*/
|
||||
/** @var QrCodeAction */
|
||||
protected $action;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
protected $urlShortener;
|
||||
|
||||
public function setUp()
|
||||
|
@ -19,21 +19,13 @@ use Zend\Diactoros\ServerRequestFactory;
|
||||
|
||||
class RedirectActionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var RedirectAction
|
||||
*/
|
||||
/** @var RedirectAction */
|
||||
private $action;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $urlShortener;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $visitTracker;
|
||||
/**
|
||||
* @var Options\NotFoundShortUrlOptions
|
||||
*/
|
||||
/** @var Options\NotFoundShortUrlOptions */
|
||||
private $notFoundOptions;
|
||||
|
||||
public function setUp()
|
||||
|
@ -8,9 +8,7 @@ use Shlinkio\Shlink\Core\ConfigProvider;
|
||||
|
||||
class ConfigProviderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ConfigProvider
|
||||
*/
|
||||
/** @var ConfigProvider */
|
||||
protected $configProvider;
|
||||
|
||||
public function setUp()
|
||||
|
@ -15,13 +15,9 @@ use Zend\Diactoros\Uri;
|
||||
|
||||
class QrCodeCacheMiddlewareTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var QrCodeCacheMiddleware
|
||||
*/
|
||||
/** @var QrCodeCacheMiddleware */
|
||||
protected $middleware;
|
||||
/**
|
||||
* @var Cache
|
||||
*/
|
||||
/** @var Cache */
|
||||
protected $cache;
|
||||
|
||||
public function setUp()
|
||||
|
@ -14,13 +14,9 @@ use Zend\Expressive\Template\TemplateRendererInterface;
|
||||
|
||||
class NotFoundHandlerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var NotFoundHandler
|
||||
*/
|
||||
/** @var NotFoundHandler */
|
||||
private $delegate;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $renderer;
|
||||
|
||||
public function setUp()
|
||||
|
@ -20,13 +20,9 @@ use function range;
|
||||
|
||||
class DeleteShortUrlServiceTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var DeleteShortUrlService
|
||||
*/
|
||||
/** @var DeleteShortUrlService */
|
||||
private $service;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $em;
|
||||
|
||||
public function setUp()
|
||||
|
@ -19,13 +19,9 @@ use function count;
|
||||
|
||||
class ShortUrlServiceTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ShortUrlService
|
||||
*/
|
||||
/** @var ShortUrlService */
|
||||
protected $service;
|
||||
/**
|
||||
* @var ObjectProphecy|EntityManagerInterface
|
||||
*/
|
||||
/** @var ObjectProphecy|EntityManagerInterface */
|
||||
protected $em;
|
||||
|
||||
public function setUp()
|
||||
|
@ -16,13 +16,9 @@ use Shlinkio\Shlink\Core\Service\Tag\TagService;
|
||||
|
||||
class TagServiceTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var TagService
|
||||
*/
|
||||
/** @var TagService */
|
||||
private $service;
|
||||
/**
|
||||
* @var ObjectProphecy
|
||||
*/
|
||||
/** @var ObjectProphecy */
|
||||
private $em;
|
||||
|
||||
public function setUp()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user