Increaed phpstan level to 7

This commit is contained in:
Alejandro Celaya
2021-07-17 20:58:24 +02:00
parent 8efda2ef56
commit bceea090ed
9 changed files with 28 additions and 8 deletions

View File

@@ -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());
}

View File

@@ -49,7 +49,6 @@ final class ShortUrlsOrdering
]);
}
/** @var string|array $orderBy */
if (! $isArray) {
[$field, $dir] = array_pad(explode('-', $orderBy), 2, null);
$this->orderField = $field;

View File

@@ -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));
}
}