Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: apply fixes from Pint #503

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,15 @@ private function compile(string $name): BuildCommand
/** @phpstan-ignore-next-line This is an instance of `ConsoleOutputInterface` */
$section = tap($this->originalOutput->section())->write('');

$progressBar = tap(
new ProgressBar(
$this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL ? new NullOutput() : $section, 25
)
)->setProgressCharacter("\xF0\x9F\x8D\xBA");
$progressBar = new ProgressBar(
$this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL ? new NullOutput : $section, 25
);

$progressBar->setProgressCharacter("\xF0\x9F\x8D\xBA");

$process->start();

foreach (tap($process)->start() as $type => $data) {
foreach ($process as $type => $data) {
$progressBar->advance();

if ($this->output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) {
Expand Down
4 changes: 1 addition & 3 deletions src/Commands/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ abstract class Command extends BaseCommand
/**
* Define the command's schedule.
*/
public function schedule(Schedule $schedule)
{
}
public function schedule(Schedule $schedule) {}

/**
* @param Application $laravel
Expand Down
9 changes: 5 additions & 4 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace LaravelZero\Framework\Commands;

use LaravelZero\Framework\Components;
use LaravelZero\Framework\Components\AbstractInstaller;
use Symfony\Component\Console\Input\ArrayInput;

final class InstallCommand extends Command
Expand Down Expand Up @@ -46,9 +47,6 @@ final class InstallCommand extends Command
'view' => Components\View\Installer::class,
];

/**
* {@inheritdoc}
*/
public function handle()
{
$title = 'Laravel Zero - Component installer';
Expand All @@ -63,7 +61,10 @@ public function handle()
}

if ($option !== null && ! empty($this->componentInstallers[$option])) {
$command = tap($this->app[$this->componentInstallers[$option]])->setLaravel($this->app);
/** @var AbstractInstaller $command */
$command = $this->app[$this->componentInstallers[$option]];

$command->setLaravel($this->app);

$command->setApplication($this->getApplication());

Expand Down
4 changes: 1 addition & 3 deletions src/Components/Updater/Strategy/GithubReleasesStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace LaravelZero\Framework\Components\Updater\Strategy;

final class GithubReleasesStrategy extends \Humbug\SelfUpdate\Strategy\GithubStrategy implements StrategyInterface
{
}
final class GithubReleasesStrategy extends \Humbug\SelfUpdate\Strategy\GithubStrategy implements StrategyInterface {}
4 changes: 1 addition & 3 deletions src/Providers/Composer/Composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ final class Composer implements ComposerContract
*
* @return void
*/
public function __construct(private readonly Application $app)
{
}
public function __construct(private readonly Application $app) {}

/**
* {@inheritdoc}
Expand Down
12 changes: 5 additions & 7 deletions tests/BuildCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
$composerMock = $this->createMock(ComposerContract::class);
$this->app->instance(ComposerContract::class, $composerMock);

$output = new class() extends NullOutput
$output = new class extends NullOutput
{
public function section(): NullOutput
{
return new class() extends NullOutput
return new class extends NullOutput
{
public function clear()
{
}
public function clear() {}
};
}
};
Expand All @@ -50,11 +48,11 @@ public function clear()

$contents = File::get(config_path('app.php'));

$output = new class() extends NullOutput
$output = new class extends NullOutput
{
public function section(): NullOutput
{
return new class() extends NullOutput
return new class extends NullOutput
{
public function clear()
{
Expand Down
Loading