Added rest of tests to phpstan check

This commit is contained in:
Alejandro Celaya 2022-10-24 20:25:06 +02:00
parent f459a99e7e
commit 01e0a95e14
4 changed files with 5 additions and 5 deletions

View file

@ -109,7 +109,7 @@
], ],
"cs": "phpcs", "cs": "phpcs",
"cs:fix": "phpcbf", "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": [ "test": [
"@parallel test:unit test:db", "@parallel test:unit test:db",
"@parallel test:api test:cli" "@parallel test:api test:cli"

View file

@ -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 private function createShortUrl(array $body = [], string $apiKey = 'valid_api_key', string $version = '2'): array
{ {

View file

@ -62,13 +62,13 @@ class EditShortUrlTest extends ApiTestCase
]]; ]];
} }
private function findShortUrlMetaByShortCode(string $shortCode): ?array private function findShortUrlMetaByShortCode(string $shortCode): array
{ {
$matchingShortUrl = $this->getJsonResponsePayload( $matchingShortUrl = $this->getJsonResponsePayload(
$this->callApiWithKey(self::METHOD_GET, '/short-urls/' . $shortCode), $this->callApiWithKey(self::METHOD_GET, '/short-urls/' . $shortCode),
); );
return $matchingShortUrl['meta'] ?? null; return $matchingShortUrl['meta'] ?? [];
} }
/** /**

View file

@ -23,7 +23,7 @@ class ShortUrlsFixture extends AbstractFixture implements DependentFixtureInterf
public function load(ObjectManager $manager): void public function load(ObjectManager $manager): void
{ {
$relationResolver = new PersistenceShortUrlRelationResolver($manager); $relationResolver = new PersistenceShortUrlRelationResolver($manager); // @phpstan-ignore-line
/** @var ApiKey $authorApiKey */ /** @var ApiKey $authorApiKey */
$authorApiKey = $this->getReference('author_api_key'); $authorApiKey = $this->getReference('author_api_key');