mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Increaed phpstan level to 7
This commit is contained in:
@@ -23,6 +23,7 @@ class RobotsAction implements RequestHandlerInterface, StatusCodeInterface
|
||||
|
||||
public function handle(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
// @phpstan-ignore-next-line The "Response" phpdoc is wrong
|
||||
return new Response(self::STATUS_OK, ['Content-type' => 'text/plain'], $this->buildRobots());
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ final class ShortUrlsOrdering
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var string|array $orderBy */
|
||||
if (! $isArray) {
|
||||
[$field, $dir] = array_pad(explode('-', $orderBy), 2, null);
|
||||
$this->orderField = $field;
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace Shlinkio\Shlink\Core\Util;
|
||||
use Cocur\Slugify\SlugifyInterface;
|
||||
use Symfony\Component\String\AbstractUnicodeString;
|
||||
use Symfony\Component\String\Slugger\SluggerInterface;
|
||||
|
||||
use function Symfony\Component\String\s;
|
||||
use Symfony\Component\String\UnicodeString;
|
||||
|
||||
class CocurSymfonySluggerBridge implements SluggerInterface
|
||||
{
|
||||
@@ -18,6 +17,6 @@ class CocurSymfonySluggerBridge implements SluggerInterface
|
||||
|
||||
public function slug(string $string, string $separator = '-', ?string $locale = null): AbstractUnicodeString
|
||||
{
|
||||
return s($this->slugger->slugify($string, $separator));
|
||||
return new UnicodeString($this->slugger->slugify($string, $separator));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user