Skip to content

Commit

Permalink
Merge pull request #160 from dissto/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
CodeWithDennis authored Apr 14, 2024
2 parents ecb5f93 + be2a846 commit 9bbfa13
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Commands/FilamentTestsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public function stubHandler(Resource $resource): StubHandler

public function handle(): int
{
$this->numTests = 0;
$availableResources = $this->getAvailableResources();

if (! $this->argument('name')) {
Expand Down Expand Up @@ -166,9 +165,12 @@ protected function getSourceFile(Resource $resource): array|bool|string

$resourceName = str($this->getNormalizedResourceName($resource::class))->afterLast('\\')->toString();

$numTests = 0;
$countTests = 0;

$todos = collect();

$countTodos = 0;

$start = microtime(true);

foreach ($this->getStubs($resource) as $stub) {
Expand All @@ -177,7 +179,7 @@ protected function getSourceFile(Resource $resource): array|bool|string
}

if (! $stub['isTodo']) {
$numTests++;
$countTests++;
}

if ($stub['isTodo']) {
Expand All @@ -194,7 +196,7 @@ protected function getSourceFile(Resource $resource): array|bool|string

$this->selectedResources->push([
'name' => $resourceName,
'tests' => $numTests,
'tests' => $countTests,
'duration' => $duration,
]);

Expand Down

0 comments on commit 9bbfa13

Please sign in to comment.