mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Replaced all FQ global function and constants by explicit imports
This commit is contained in:
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Core\Action;
|
||||
|
||||
use finfo;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\Prophecy\MethodProphecy;
|
||||
@@ -76,7 +77,7 @@ class PreviewActionTest extends TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals(filesize($path), $resp->getHeaderLine('Content-length'));
|
||||
$this->assertEquals((new \finfo(FILEINFO_MIME))->file($path), $resp->getHeaderLine('Content-type'));
|
||||
$this->assertEquals((new finfo(FILEINFO_MIME))->file($path), $resp->getHeaderLine('Content-type'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace ShlinkioTest\Shlink\Core\Exception;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Core\Exception\DeleteShortUrlException;
|
||||
use function array_map;
|
||||
use function range;
|
||||
|
||||
class DeleteShortUrlExceptionTest extends TestCase
|
||||
{
|
||||
@@ -54,8 +56,8 @@ class DeleteShortUrlExceptionTest extends TestCase
|
||||
|
||||
public function provideThresholds(): array
|
||||
{
|
||||
return \array_map(function (int $number) {
|
||||
return array_map(function (int $number) {
|
||||
return [$number];
|
||||
}, \range(5, 50, 5));
|
||||
}, range(5, 50, 5));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ use Shlinkio\Shlink\Core\Exception\DeleteShortUrlException;
|
||||
use Shlinkio\Shlink\Core\Options\DeleteShortUrlsOptions;
|
||||
use Shlinkio\Shlink\Core\Repository\ShortUrlRepositoryInterface;
|
||||
use Shlinkio\Shlink\Core\Service\ShortUrl\DeleteShortUrlService;
|
||||
use function array_map;
|
||||
use function range;
|
||||
|
||||
class DeleteShortUrlServiceTest extends TestCase
|
||||
{
|
||||
@@ -29,9 +31,9 @@ class DeleteShortUrlServiceTest extends TestCase
|
||||
public function setUp()
|
||||
{
|
||||
$shortUrl = (new ShortUrl())->setShortCode('abc123')
|
||||
->setVisits(new ArrayCollection(\array_map(function () {
|
||||
->setVisits(new ArrayCollection(array_map(function () {
|
||||
return new Visit();
|
||||
}, \range(0, 10))));
|
||||
}, range(0, 10))));
|
||||
|
||||
$this->em = $this->prophesize(EntityManagerInterface::class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user