From a740b10aadab9a95863d7479f26145de5149a28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20H=C3=BCbner?= Date: Mon, 13 Jul 2026 16:39:22 +0200 Subject: [PATCH] Remove dead code: limit-violation.js and StationRepository::findIndexedByProvider - assets/js/limit-violation.js references an undefined global `exceedanceData`, is not a Webpack entry and is rendered by no template - dead on arrival. Removed. - StationRepository::findIndexedByProvider has no callers anywhere in src/ and is not HTTP-reachable. Removed. Co-Authored-By: Claude Opus 4.8 (1M context) --- assets/js/limit-violation.js | 12 ------------ src/Repository/StationRepository.php | 12 ------------ 2 files changed, 24 deletions(-) delete mode 100644 assets/js/limit-violation.js diff --git a/assets/js/limit-violation.js b/assets/js/limit-violation.js deleted file mode 100644 index 58c5aba7..00000000 --- a/assets/js/limit-violation.js +++ /dev/null @@ -1,12 +0,0 @@ -calendar_heatmap.create({ - target: '#calendar', - data: exceedanceData, - date_var: 'date', - fill_var: 'value', - color_scheme: calendar_heatmap.color_ramps.YlGnBu, - stroke_color: 'whitesmoke', - date_format: '%Y-%m-%d', - missing_as_zero: true, - title: 'Daily Measurements of Something Interesting', - show_toggle: false, -}); diff --git a/src/Repository/StationRepository.php b/src/Repository/StationRepository.php index e37b5d0b..6668b86a 100644 --- a/src/Repository/StationRepository.php +++ b/src/Repository/StationRepository.php @@ -34,18 +34,6 @@ public function findByProvider(string $providerIdentifier): array return $qb->getQuery()->getResult(); } - public function findIndexedByProvider(string $providerIdentifier, string $indexedField = 'stationCode'): array - { - $qb = $this->createQueryBuilder('s'); - - $qb - ->indexBy('s', sprintf('s.%s', $indexedField)) - ->where($qb->expr()->eq('s.provider', ':provider')) - ->setParameter('provider', $providerIdentifier); - - return $qb->getQuery()->getResult(); - } - public function findWithoutCity(): array { $qb = $this->createQueryBuilder('s');