Skip to content

Commit

Permalink
lint / comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Dec 12, 2023
1 parent b761532 commit ecf4be8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ protected function cleanupFilesAutoloader(): void
$missingFiles[] = str_replace([ $this->workingDir, 'vendor/composer/../', 'vendor/' ], '', $file);
// When `composer install --no-dev` is run, it creates an index of files autoload files which
// references the non-existant files. This causes a fatal error when the autoloader is included.
// TODO: if delete_vendor_packages is true, do not create this file.
$this->filesystem->write(
str_replace($this->workingDir, '', $file),
'<?php // This file was deleted by {@see https://github.com/BrianHenryIE/strauss}.'
Expand Down
3 changes: 3 additions & 0 deletions src/Composer/Extra/StraussConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ class StraussConfig
* Overwrite it with any Strauss config.
* Provide sensible defaults.
*
* @param Composer $composer
* @param InputInterface $input To access the command line options.
*
* @throws Exception
*/
public function __construct(Composer $composer, InputInterface $input)
Expand Down
11 changes: 6 additions & 5 deletions src/Console/Commands/Compose.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class Compose extends Command
{
use LoggerAwareTrait;

protected OutputInterface $output;

/** @var string */
protected string $workingDir;

Expand Down Expand Up @@ -71,9 +69,12 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->output = $output;

$this->setLogger(new ConsoleLogger($output, [LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL]));
$this->setLogger(
new ConsoleLogger(
$output,
[LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL]
)
);

$workingDir = getcwd() . DIRECTORY_SEPARATOR;
$this->workingDir = $workingDir;
Expand Down

0 comments on commit ecf4be8

Please sign in to comment.