Skip to content

Commit

Permalink
Fixes #33 using INDEXER_TYPE-constants (#34)
Browse files Browse the repository at this point in the history
* Fix tag name in comment
* Fixes #33 using `INDEXER_TYPE`-constants
  • Loading branch information
cundd committed Sep 25, 2023
1 parent bbb999d commit 18d772c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/DependencyInjection/StatsIndexerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function process(ContainerBuilder $container): void

$definition = $container->findDefinition(StatsIndexerProvider::class);

// find all service IDs with the t3sports.stats.player tag
// find all service IDs with the t3sports.stats.indexer tag
$taggedServices = $container->findTaggedServiceIds('t3sports.stats.indexer');

foreach ($taggedServices as $id => $tags) {
Expand Down
6 changes: 4 additions & 2 deletions Classes/Service/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
use System25\T3sports\Search\SearchCoachStats;
use System25\T3sports\Search\SearchPlayerStats;
use System25\T3sports\Search\SearchRefereeStats;
use System25\T3sports\StatsIndexer\CoachStatsInterface;
use System25\T3sports\StatsIndexer\PlayerStatsInterface;
use System25\T3sports\StatsIndexer\RefereeStatsInterface;
use System25\T3sports\Utility\ServiceRegistry;
use System25\T3sports\Utility\StatsDataBag;
use System25\T3sports\Utility\StatsMatchNoteProvider;
Expand Down Expand Up @@ -456,7 +458,7 @@ public function lookupPlayerServices()
*/
public function lookupCoachServices()
{
return $this->lookupStatsServices('t3sportsCoachStats');
return $this->lookupStatsServices(CoachStatsInterface::INDEXER_TYPE);
}

/**
Expand All @@ -466,7 +468,7 @@ public function lookupCoachServices()
*/
public function lookupRefereeServices()
{
return $this->lookupStatsServices('t3sportsRefereeStats');
return $this->lookupStatsServices(RefereeStatsInterface::INDEXER_TYPE);
}

/**
Expand Down

0 comments on commit 18d772c

Please sign in to comment.