mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Improved coding styles
This commit is contained in:
parent
fbeb959317
commit
c422a14c5c
@ -46,6 +46,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"filp/whoops": "^2.0",
|
"filp/whoops": "^2.0",
|
||||||
"phpunit/phpunit": "^6.0",
|
"phpunit/phpunit": "^6.0",
|
||||||
|
"slevomat/coding-standard": "^4.0",
|
||||||
"squizlabs/php_codesniffer": "^3.1",
|
"squizlabs/php_codesniffer": "^3.1",
|
||||||
"symfony/var-dumper": "^3.0",
|
"symfony/var-dumper": "^3.0",
|
||||||
"vlucas/phpdotenv": "^2.2",
|
"vlucas/phpdotenv": "^2.2",
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -4,11 +4,11 @@ declare(strict_types=1);
|
|||||||
use Shlinkio\Shlink\Common\Factory\EmptyResponseImplicitOptionsMiddlewareFactory;
|
use Shlinkio\Shlink\Common\Factory\EmptyResponseImplicitOptionsMiddlewareFactory;
|
||||||
use Zend\Expressive;
|
use Zend\Expressive;
|
||||||
use Zend\Expressive\Container;
|
use Zend\Expressive\Container;
|
||||||
|
use Zend\Expressive\Helper;
|
||||||
use Zend\Expressive\Middleware;
|
use Zend\Expressive\Middleware;
|
||||||
use Zend\Expressive\Plates;
|
use Zend\Expressive\Plates;
|
||||||
use Zend\Expressive\Router;
|
use Zend\Expressive\Router;
|
||||||
use Zend\Expressive\Template;
|
use Zend\Expressive\Template;
|
||||||
use Zend\Expressive\Helper;
|
|
||||||
use Zend\ServiceManager\Factory\InvokableFactory;
|
use Zend\ServiceManager\Factory\InvokableFactory;
|
||||||
use Zend\Stratigility\Middleware\ErrorHandler;
|
use Zend\Stratigility\Middleware\ErrorHandler;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Monolog\Handler\RotatingFileHandler;
|
use Monolog\Handler\RotatingFileHandler;
|
||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Middleware\LocaleMiddleware;
|
use Shlinkio\Shlink\Common\Middleware\LocaleMiddleware;
|
||||||
use Shlinkio\Shlink\Rest\Middleware\BodyParserMiddleware;
|
use Shlinkio\Shlink\Rest\Middleware\BodyParserMiddleware;
|
||||||
use Shlinkio\Shlink\Rest\Middleware\CheckAuthenticationMiddleware;
|
use Shlinkio\Shlink\Rest\Middleware\CheckAuthenticationMiddleware;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'phpwkhtmltopdf' => [
|
'phpwkhtmltopdf' => [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'preview_generation' => [
|
'preview_generation' => [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Zend\Expressive\Router\FastRouteRouter;
|
use Zend\Expressive\Router\FastRouteRouter;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
use Doctrine\ORM\Tools\Console\ConsoleRunner;
|
use Doctrine\ORM\Tools\Console\ConsoleRunner;
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Acelaya\ExpressiveErrorHandler;
|
use Acelaya\ExpressiveErrorHandler;
|
||||||
use Shlinkio\Shlink\CLI;
|
use Shlinkio\Shlink\CLI;
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Dotenv\Dotenv;
|
use Dotenv\Dotenv;
|
||||||
use Zend\ServiceManager\ServiceManager;
|
use Zend\ServiceManager\ServiceManager;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkMigrations;
|
namespace ShlinkMigrations;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkMigrations;
|
namespace ShlinkMigrations;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Command;
|
use Shlinkio\Shlink\CLI\Command;
|
||||||
use Shlinkio\Shlink\Common;
|
use Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ return [
|
|||||||
Command\Tag\CreateTagCommand::class,
|
Command\Tag\CreateTagCommand::class,
|
||||||
Command\Tag\RenameTagCommand::class,
|
Command\Tag\RenameTagCommand::class,
|
||||||
Command\Tag\DeleteTagsCommand::class,
|
Command\Tag\DeleteTagsCommand::class,
|
||||||
]
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Command;
|
use Shlinkio\Shlink\CLI\Command;
|
||||||
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
|
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
|
||||||
@ -46,12 +47,12 @@ return [
|
|||||||
Command\Shortcode\GeneratePreviewCommand::class => [
|
Command\Shortcode\GeneratePreviewCommand::class => [
|
||||||
Service\ShortUrlService::class,
|
Service\ShortUrlService::class,
|
||||||
PreviewGenerator::class,
|
PreviewGenerator::class,
|
||||||
'translator'
|
'translator',
|
||||||
],
|
],
|
||||||
Command\Visit\ProcessVisitsCommand::class => [
|
Command\Visit\ProcessVisitsCommand::class => [
|
||||||
Service\VisitService::class,
|
Service\VisitService::class,
|
||||||
IpLocationResolver::class,
|
IpLocationResolver::class,
|
||||||
'translator'
|
'translator',
|
||||||
],
|
],
|
||||||
Command\Config\GenerateCharsetCommand::class => ['translator'],
|
Command\Config\GenerateCharsetCommand::class => ['translator'],
|
||||||
Command\Config\GenerateSecretCommand::class => ['translator'],
|
Command\Config\GenerateSecretCommand::class => ['translator'],
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'translator' => [
|
'translator' => [
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Api;
|
namespace Shlinkio\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
|
use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Api;
|
namespace Shlinkio\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
|
use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Api;
|
namespace Shlinkio\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
use Shlinkio\Shlink\Rest\Entity\ApiKey;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Config;
|
namespace Shlinkio\Shlink\CLI\Command\Config;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
use Shlinkio\Shlink\Core\Service\UrlShortener;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Config;
|
namespace Shlinkio\Shlink\CLI\Command\Config;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
|
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Install;
|
namespace Shlinkio\Shlink\CLI\Command\Install;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManagerInterface;
|
use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManagerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Exception\PreviewGenerationException;
|
use Shlinkio\Shlink\Common\Exception\PreviewGenerationException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
|
use Shlinkio\Shlink\Core\Exception\InvalidUrlException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Util\DateRange;
|
use Shlinkio\Shlink\Common\Util\DateRange;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Paginator\Adapter\PaginableRepositoryAdapter;
|
use Shlinkio\Shlink\Common\Paginator\Adapter\PaginableRepositoryAdapter;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
namespace Shlinkio\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
|
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Entity\Tag;
|
use Shlinkio\Shlink\Core\Entity\Tag;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
namespace Shlinkio\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Core\Exception\EntityDoesNotExistException;
|
use Shlinkio\Shlink\Core\Exception\EntityDoesNotExistException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Command\Visit;
|
namespace Shlinkio\Shlink\CLI\Command\Visit;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Exception\WrongIpException;
|
use Shlinkio\Shlink\Common\Exception\WrongIpException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI;
|
namespace Shlinkio\Shlink\CLI;
|
||||||
|
|
||||||
use Zend\Config\Factory;
|
use Zend\Config\Factory;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Factory;
|
namespace Shlinkio\Shlink\CLI\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Factory;
|
namespace Shlinkio\Shlink\CLI\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install;
|
namespace Shlinkio\Shlink\CLI\Install;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerPluginInterface;
|
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerPluginInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install;
|
namespace Shlinkio\Shlink\CLI\Install;
|
||||||
|
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Symfony\Component\Console\Exception\RuntimeException;
|
use Symfony\Component\Console\Exception\RuntimeException;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Acelaya\ZsmAnnotatedServices\Annotation as DI;
|
use Acelaya\ZsmAnnotatedServices\Annotation as DI;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin\Factory;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
namespace Shlinkio\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
|
||||||
@ -42,7 +44,7 @@ class UrlShortenerConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
|||||||
'Character set for generated short codes (leave empty to autogenerate one)',
|
'Character set for generated short codes (leave empty to autogenerate one)',
|
||||||
null,
|
null,
|
||||||
true
|
true
|
||||||
) ?: str_shuffle(UrlShortener::DEFAULT_CHARS)
|
) ?: str_shuffle(UrlShortener::DEFAULT_CHARS),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\CLI\Model;
|
namespace Shlinkio\Shlink\CLI\Model;
|
||||||
|
|
||||||
use Zend\Stdlib\ArraySerializableInterface;
|
use Zend\Stdlib\ArraySerializableInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
namespace ShlinkioTest\Shlink\CLI\Command\Api;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Config;
|
namespace ShlinkioTest\Shlink\CLI\Command\Config;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Install;
|
namespace ShlinkioTest\Shlink\CLI\Command\Install;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
@ -63,7 +65,7 @@ class GeneratePreviewCommandTest extends TestCase
|
|||||||
$this->previewGenerator->generatePreview('http://baz.com/something')->shouldBeCalledTimes(1);
|
$this->previewGenerator->generatePreview('http://baz.com/something')->shouldBeCalledTimes(1);
|
||||||
|
|
||||||
$this->commandTester->execute([
|
$this->commandTester->execute([
|
||||||
'command' => 'shortcode:process-previews'
|
'command' => 'shortcode:process-previews',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ class GeneratePreviewCommandTest extends TestCase
|
|||||||
->shouldBeCalledTimes(count($items));
|
->shouldBeCalledTimes(count($items));
|
||||||
|
|
||||||
$this->commandTester->execute([
|
$this->commandTester->execute([
|
||||||
'command' => 'shortcode:process-previews'
|
'command' => 'shortcode:process-previews',
|
||||||
]);
|
]);
|
||||||
$output = $this->commandTester->getDisplay();
|
$output = $this->commandTester->getDisplay();
|
||||||
$this->assertEquals(count($items), substr_count($output, 'Error'));
|
$this->assertEquals(count($items), substr_count($output, 'Error'));
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
@ -27,7 +29,7 @@ class GenerateShortcodeCommandTest extends TestCase
|
|||||||
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
$this->urlShortener = $this->prophesize(UrlShortener::class);
|
||||||
$command = new GenerateShortcodeCommand($this->urlShortener->reveal(), Translator::factory([]), [
|
$command = new GenerateShortcodeCommand($this->urlShortener->reveal(), Translator::factory([]), [
|
||||||
'schema' => 'http',
|
'schema' => 'http',
|
||||||
'hostname' => 'foo.com'
|
'hostname' => 'foo.com',
|
||||||
]);
|
]);
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
$app->add($command);
|
$app->add($command);
|
||||||
@ -44,7 +46,7 @@ class GenerateShortcodeCommandTest extends TestCase
|
|||||||
|
|
||||||
$this->commandTester->execute([
|
$this->commandTester->execute([
|
||||||
'command' => 'shortcode:generate',
|
'command' => 'shortcode:generate',
|
||||||
'longUrl' => 'http://domain.com/foo/bar'
|
'longUrl' => 'http://domain.com/foo/bar',
|
||||||
]);
|
]);
|
||||||
$output = $this->commandTester->getDisplay();
|
$output = $this->commandTester->getDisplay();
|
||||||
$this->assertTrue(strpos($output, 'http://foo.com/abc123') > 0);
|
$this->assertTrue(strpos($output, 'http://foo.com/abc123') > 0);
|
||||||
@ -60,7 +62,7 @@ class GenerateShortcodeCommandTest extends TestCase
|
|||||||
|
|
||||||
$this->commandTester->execute([
|
$this->commandTester->execute([
|
||||||
'command' => 'shortcode:generate',
|
'command' => 'shortcode:generate',
|
||||||
'longUrl' => 'http://domain.com/invalid'
|
'longUrl' => 'http://domain.com/invalid',
|
||||||
]);
|
]);
|
||||||
$output = $this->commandTester->getDisplay();
|
$output = $this->commandTester->getDisplay();
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
namespace ShlinkioTest\Shlink\CLI\Command\Shortcode;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Prophecy\Prophecy\MethodProphecy;
|
use Prophecy\Prophecy\MethodProphecy;
|
||||||
use Prophecy\Prophecy\ObjectProphecy;
|
use Prophecy\Prophecy\ObjectProphecy;
|
||||||
use Shlinkio\Shlink\CLI\Command\Tag\ListTagsCommand;
|
use Shlinkio\Shlink\CLI\Command\Tag\ListTagsCommand;
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
use Shlinkio\Shlink\Core\Entity\Tag;
|
use Shlinkio\Shlink\Core\Entity\Tag;
|
||||||
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
use Shlinkio\Shlink\Core\Service\Tag\TagServiceInterface;
|
||||||
use Symfony\Component\Console\Application;
|
use Symfony\Component\Console\Application;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
namespace ShlinkioTest\Shlink\CLI\Command\Tag;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Command\Visit;
|
namespace ShlinkioTest\Shlink\CLI\Command\Visit;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI;
|
namespace ShlinkioTest\Shlink\CLI;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Factory;
|
namespace ShlinkioTest\Shlink\CLI\Factory;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Factory;
|
namespace ShlinkioTest\Shlink\CLI\Factory;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Install\Plugin\Factory;
|
namespace ShlinkioTest\Shlink\CLI\Install\Plugin\Factory;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
namespace ShlinkioTest\Shlink\CLI\Install\Plugin;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Doctrine\Common\Cache\Cache;
|
use Doctrine\Common\Cache\Cache;
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common;
|
namespace Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common;
|
namespace Shlinkio\Shlink\Common;
|
||||||
|
|
||||||
use Zend\Config\Factory;
|
use Zend\Config\Factory;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Entity;
|
namespace Shlinkio\Shlink\Common\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Exception;
|
namespace Shlinkio\Shlink\Common\Exception;
|
||||||
|
|
||||||
interface ExceptionInterface
|
interface ExceptionInterface
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Exception;
|
namespace Shlinkio\Shlink\Common\Exception;
|
||||||
|
|
||||||
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
|
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Exception;
|
namespace Shlinkio\Shlink\Common\Exception;
|
||||||
|
|
||||||
class PreviewGenerationException extends RuntimeException
|
class PreviewGenerationException extends RuntimeException
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Exception;
|
namespace Shlinkio\Shlink\Common\Exception;
|
||||||
|
|
||||||
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
class RuntimeException extends \RuntimeException implements ExceptionInterface
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Exception;
|
namespace Shlinkio\Shlink\Common\Exception;
|
||||||
|
|
||||||
class WrongIpException extends RuntimeException
|
class WrongIpException extends RuntimeException
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Doctrine\Common\Cache;
|
use Doctrine\Common\Cache;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Doctrine\Common\Cache\ArrayCache;
|
use Doctrine\Common\Cache\ArrayCache;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Cascade\Cascade;
|
use Cascade\Cascade;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Factory;
|
namespace Shlinkio\Shlink\Common\Factory;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Image;
|
namespace Shlinkio\Shlink\Common\Image;
|
||||||
|
|
||||||
use mikehaertl\wkhtmlto\Image;
|
use mikehaertl\wkhtmlto\Image;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Image;
|
namespace Shlinkio\Shlink\Common\Image;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Image;
|
namespace Shlinkio\Shlink\Common\Image;
|
||||||
|
|
||||||
use Zend\ServiceManager\ServiceLocatorInterface;
|
use Zend\ServiceManager\ServiceLocatorInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Image;
|
namespace Shlinkio\Shlink\Common\Image;
|
||||||
|
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Middleware;
|
namespace Shlinkio\Shlink\Common\Middleware;
|
||||||
|
|
||||||
use Interop\Http\ServerMiddleware\DelegateInterface;
|
use Interop\Http\ServerMiddleware\DelegateInterface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Paginator\Adapter;
|
namespace Shlinkio\Shlink\Common\Paginator\Adapter;
|
||||||
|
|
||||||
use Shlinkio\Shlink\Common\Repository\PaginableRepositoryInterface;
|
use Shlinkio\Shlink\Common\Repository\PaginableRepositoryInterface;
|
||||||
@ -32,7 +34,7 @@ class PaginableRepositoryAdapter implements AdapterInterface
|
|||||||
$orderBy = null
|
$orderBy = null
|
||||||
) {
|
) {
|
||||||
$this->paginableRepository = $paginableRepository;
|
$this->paginableRepository = $paginableRepository;
|
||||||
$this->searchTerm = trim(strip_tags($searchTerm));
|
$this->searchTerm = $searchTerm !== null ? trim(strip_tags($searchTerm)) : null;
|
||||||
$this->orderBy = $orderBy;
|
$this->orderBy = $orderBy;
|
||||||
$this->tags = $tags;
|
$this->tags = $tags;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Paginator\Util;
|
namespace Shlinkio\Shlink\Common\Paginator\Util;
|
||||||
|
|
||||||
use Zend\Paginator\Paginator;
|
use Zend\Paginator\Paginator;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Repository;
|
namespace Shlinkio\Shlink\Common\Repository;
|
||||||
|
|
||||||
interface PaginableRepositoryInterface
|
interface PaginableRepositoryInterface
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Response;
|
namespace Shlinkio\Shlink\Common\Response;
|
||||||
|
|
||||||
use Endroid\QrCode\QrCode;
|
use Endroid\QrCode\QrCode;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Service;
|
namespace Shlinkio\Shlink\Common\Service;
|
||||||
|
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
@ -27,7 +29,7 @@ class IpLocationResolver implements IpLocationResolverInterface
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$response = $this->httpClient->get(sprintf(self::SERVICE_PATTERN, $ipAddress));
|
$response = $this->httpClient->get(sprintf(self::SERVICE_PATTERN, $ipAddress));
|
||||||
return json_decode($response->getBody(), true);
|
return json_decode((string) $response->getBody(), true);
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
throw WrongIpException::fromIpAddress($ipAddress, $e);
|
throw WrongIpException::fromIpAddress($ipAddress, $e);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Service;
|
namespace Shlinkio\Shlink\Common\Service;
|
||||||
|
|
||||||
interface IpLocationResolverInterface
|
interface IpLocationResolverInterface
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Shlinkio\Shlink\Common\Service;
|
namespace Shlinkio\Shlink\Common\Service;
|
||||||
|
|
||||||
use mikehaertl\wkhtmlto\Image;
|
use mikehaertl\wkhtmlto\Image;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user