Skip to content

Commit

Permalink
skip legacys
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Aug 23, 2024
1 parent 1d4f889 commit aed98e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/Controller/Stats/FindRuleStatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@ public function __invoke(): View
$queriesToCount = $this->filterQueriesToCount($searchRecords);
$rulesToCount = $this->filterRulesToCount($searchRecords);

// remove values with space as legacy
$sets = $this->getArrayFlattenKey($searchRecords, 'set');
$sets = array_filter($sets, fn (string $set): bool => ! str_contains($set, ' '));

$setsToCount = Arrays::groupToCount($sets, 4);

// remove ones with "\" as legacy
$nodeTypes = array_filter($nodeTypes, fn (string $nodeType): bool => ! str_contains($nodeType, '\\'));
$nodeTypesToCount = Arrays::groupToCount($nodeTypes, 5);

// day by day stats
Expand Down
6 changes: 3 additions & 3 deletions src/Livewire/RectorFilterComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ private function getFilteredRuleMetadatas(): array

private function logRuleSearch(): void
{
/** @var RectorFuleSearchLogger $searchLogger */
$searchLogger = app(RectorFuleSearchLogger::class);
/** @var RectorFuleSearchLogger $rectorFuleSearchLogger */
$rectorFuleSearchLogger = app(RectorFuleSearchLogger::class);

// log only meaningful query, not a start of typing, to keep data clean
$searchLogger->log($this->query, $this->nodeType, $this->rectorSet);
$rectorFuleSearchLogger->log($this->query, $this->nodeType, $this->rectorSet);
}
}

0 comments on commit aed98e0

Please sign in to comment.