mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-21 22:53:52 -06:00
Added rest of tests to phpstan check
This commit is contained in:
parent
f459a99e7e
commit
01e0a95e14
@ -109,7 +109,7 @@
|
||||
],
|
||||
"cs": "phpcs",
|
||||
"cs:fix": "phpcbf",
|
||||
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test module/*/test-db module/*/config config docker/config data/migrations --level=8",
|
||||
"stan": "APP_ENV=test php vendor/bin/phpstan analyse module/*/src module/*/test* module/*/config config docker/config data/migrations --level=8",
|
||||
"test": [
|
||||
"@parallel test:unit test:db",
|
||||
"@parallel test:api test:cli"
|
||||
|
@ -363,7 +363,7 @@ class CreateShortUrlTest extends ApiTestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{int $statusCode, array $payload}
|
||||
* @return array{int, array}
|
||||
*/
|
||||
private function createShortUrl(array $body = [], string $apiKey = 'valid_api_key', string $version = '2'): array
|
||||
{
|
||||
|
@ -62,13 +62,13 @@ class EditShortUrlTest extends ApiTestCase
|
||||
]];
|
||||
}
|
||||
|
||||
private function findShortUrlMetaByShortCode(string $shortCode): ?array
|
||||
private function findShortUrlMetaByShortCode(string $shortCode): array
|
||||
{
|
||||
$matchingShortUrl = $this->getJsonResponsePayload(
|
||||
$this->callApiWithKey(self::METHOD_GET, '/short-urls/' . $shortCode),
|
||||
);
|
||||
|
||||
return $matchingShortUrl['meta'] ?? null;
|
||||
return $matchingShortUrl['meta'] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ class ShortUrlsFixture extends AbstractFixture implements DependentFixtureInterf
|
||||
|
||||
public function load(ObjectManager $manager): void
|
||||
{
|
||||
$relationResolver = new PersistenceShortUrlRelationResolver($manager);
|
||||
$relationResolver = new PersistenceShortUrlRelationResolver($manager); // @phpstan-ignore-line
|
||||
|
||||
/** @var ApiKey $authorApiKey */
|
||||
$authorApiKey = $this->getReference('author_api_key');
|
||||
|
Loading…
Reference in New Issue
Block a user