Skip to content

Commit 2b78710

Browse files
committed
merge
2 parents ba210af + 3032111 commit 2b78710

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Commands/ModelsCount.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@ public function performModelCount(array $models, CarbonPeriod $period, string $e
4949
$label = $model;
5050
if ($scope && $scopeValue) {
5151
$label .= '::'.$scope.'('.$scopeValue.')';
52-
} else if ($scope) {
52+
} elseif ($scope) {
5353
$label .= '::'.$scope;
5454
}
5555

56-
57-
5856
$this->verbose("Counting $label - count: ".$count);
5957
$metrics[] = (object) ['label' => $label, 'count' => $count];
6058

tests/commands/RunModelCountWithScopeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

33
use App\Testing\Models\Bill;
4-
use App\Testing\Models\User;
54
use Illuminate\Console\Command;
6-
use Illuminate\Support\Facades\Http;
75
use Illuminate\Support\Facades\Artisan;
6+
use Illuminate\Support\Facades\Http;
87
use Symfony\Component\Console\Output\BufferedOutput;
98

109
it('ensure models-count is callable', function () {
@@ -22,4 +21,5 @@
2221
})->with([
2322
fn () => Bill::factory()->create(['ref' => 'BILL_0000001', 'price' => 1000]),
2423
fn () => Bill::factory()->create(['ref' => 'BILL_0000002', 'price' => 500]),
25-
]);
24+
]);
25+

0 commit comments

Comments
 (0)