diff --git a/src/Controller/AnalyticsController.php b/src/Controller/AnalyticsController.php index a51ac58..be139b2 100644 --- a/src/Controller/AnalyticsController.php +++ b/src/Controller/AnalyticsController.php @@ -79,6 +79,7 @@ class AnalyticsController extends AbstractController return new Response('', 204); } + /** @param array $data */ private function createVisitor( Request $request, array $data, diff --git a/src/Service/AnalyticsCryptoService.php b/src/Service/AnalyticsCryptoService.php index 9fee7d3..eb714b3 100644 --- a/src/Service/AnalyticsCryptoService.php +++ b/src/Service/AnalyticsCryptoService.php @@ -14,6 +14,7 @@ class AnalyticsCryptoService $this->key = substr(hash('sha256', $this->analyticsSecret, true), 0, 32); } + /** @param array $data */ public function encrypt(array $data): string { $json = json_encode($data, \JSON_THROW_ON_ERROR); @@ -24,6 +25,7 @@ class AnalyticsCryptoService return base64_encode($iv.$encrypted.$tag); } + /** @return array|null */ public function decrypt(string $payload): ?array { $raw = base64_decode($payload, true); diff --git a/src/Service/InfraService.php b/src/Service/InfraService.php index 1caf3bb..8c9556c 100644 --- a/src/Service/InfraService.php +++ b/src/Service/InfraService.php @@ -224,6 +224,7 @@ class InfraService return $result; } + /** @param array|null $stats */ private function calcCpuPercent(?array $stats): string { if (!$stats) { @@ -241,6 +242,8 @@ class InfraService } /** + * @param array|null $stats + * * @return array{used: string, limit: string, percent: string} */ private function calcMemory(?array $stats): array diff --git a/src/Service/MeilisearchService.php b/src/Service/MeilisearchService.php index e1a614f..55aaceb 100644 --- a/src/Service/MeilisearchService.php +++ b/src/Service/MeilisearchService.php @@ -3,6 +3,7 @@ namespace App\Service; use App\Message\MeilisearchMessage; +use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Contracts\Cache\CacheInterface; @@ -16,7 +17,7 @@ class MeilisearchService private MessageBusInterface $bus, #[Autowire(env: 'MEILISEARCH_URL')] private string $url, #[Autowire(env: 'MEILISEARCH_API_KEY')] private string $apiKey, - #[Autowire(service: 'meilisearch.cache')] private CacheInterface $cache, + #[Autowire(service: 'meilisearch.cache')] private CacheInterface&CacheItemPoolInterface $cache, ) { }