Skip to content

Commit

Permalink
add number_format in impressions
Browse files Browse the repository at this point in the history
  • Loading branch information
lam0819 committed Oct 18, 2024
1 parent a752e13 commit eed9d04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/PanOverview.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public function table(Table $table): Table
->columns([
TextColumn::make('id'),
TextColumn::make('name')->searchable(),
TextColumn::make('impressions')->sortable(),
TextColumn::make('impressions')
->sortable()
->formatStateUsing(fn ($state) => number_format($state, 0, '.', ',')),

Check failure on line 31 in src/Components/PanOverview.php

View workflow job for this annotation

GitHub Actions / phpstan

Out of 21 possible param types, only 20 - 95.2 % actually have it. Add more param types to get over 99 %
TextColumn::make('hovers')
->formatStateUsing(
fn (mixed $state, ?PanAnalytics $record) => number_format($state) . ' (' . number_format($record->hover_percentage, 1) . '%)'
Expand Down

0 comments on commit eed9d04

Please sign in to comment.