Skip to content

Commit 960797d

Browse files
committed
Merge branch 'php7.4' of github.com:eloquentize/laravel-client into php7.4
2 parents de2cc42 + f443208 commit 960797d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
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

Lines changed: 4 additions & 5 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 () {
@@ -16,10 +15,10 @@
1615
// ->assertExitCode(Command::SUCCESS);
1716

1817
$this->output = new BufferedOutput();
19-
Artisan::call('eloquentize:models-count --modelsPath=Testing/Models -v --models=Bill --scope=PriceOver --scopeValue=1 -v',[], $this->output);
18+
Artisan::call('eloquentize:models-count --modelsPath=Testing/Models -v --models=Bill --scope=PriceOver --scopeValue=1 -v', [], $this->output);
2019
$outputContent = $this->output->fetch();
21-
echo "out :".$outputContent;
20+
echo 'out :'.$outputContent;
2221
})->with([
2322
fn () => Bill::factory()->create(['ref' => 'BILL_0000001', 'price' => 1000]),
2423
fn () => Bill::factory()->create(['ref' => 'BILL_0000002', 'price' => 500]),
25-
])->only();
24+
])->only();

0 commit comments

Comments
 (0)