Skip to content

Commit 92bea89

Browse files
AhmedAlaa4611tegos
authored andcommitted
Refactor chained method calls for readability (laravel#57054)
1 parent 588b9c8 commit 92bea89

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Illuminate/Database/Seeder.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ public function call($class, $silent = false, array $parameters = [])
5050
$name = get_class($seeder);
5151

5252
if ($silent === false && isset($this->command)) {
53-
(new TwoColumnDetail($this->command->getOutput()))->render(
54-
$name,
55-
'<fg=yellow;options=bold>RUNNING</>'
56-
);
53+
(new TwoColumnDetail($this->command->getOutput()))
54+
->render($name, '<fg=yellow;options=bold>RUNNING</>');
5755
}
5856

5957
$startTime = microtime(true);
@@ -63,10 +61,8 @@ public function call($class, $silent = false, array $parameters = [])
6361
if ($silent === false && isset($this->command)) {
6462
$runTime = number_format((microtime(true) - $startTime) * 1000);
6563

66-
(new TwoColumnDetail($this->command->getOutput()))->render(
67-
$name,
68-
"<fg=gray>$runTime ms</> <fg=green;options=bold>DONE</>"
69-
);
64+
(new TwoColumnDetail($this->command->getOutput()))
65+
->render($name, "<fg=gray>$runTime ms</> <fg=green;options=bold>DONE</>");
7066

7167
$this->command->getOutput()->writeln('');
7268
}

0 commit comments

Comments
 (0)