Skip to content

Commit

Permalink
Coding standards line length fixes
Browse files Browse the repository at this point in the history
coenjacobs committed Jul 23, 2024
1 parent 5c08c14 commit 18ddaa2
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Composer/Config.php
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public function __construct(array $data)
public static function loadFromFile(string $filePath): Config
{
$fileContents = file_get_contents($filePath);
$config = ( ! $fileContents ) ? $config = array() : json_decode( $fileContents );
$config = ( ! $fileContents ) ? $config = array() : json_decode($fileContents);
return new self((array)$config);
}

3 changes: 2 additions & 1 deletion src/Console/Commands/Compose.php
Original file line number Diff line number Diff line change
@@ -71,7 +71,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

$packagesByName = $this->findPackages($require);
$excludedPackagesNames = is_array($this->config->get('excluded_packages')) ? $this->config->get('excluded_packages') : [];
$excludedPackagesNames = is_array($this->config->get('excluded_packages')) ?
$this->config->get('excluded_packages') : [];
$packagesToMoveByName = array_diff_key($packagesByName, array_flip($excludedPackagesNames));
$packages = array_values($packagesToMoveByName);

3 changes: 2 additions & 1 deletion src/Replacer.php
Original file line number Diff line number Diff line change
@@ -218,7 +218,8 @@ public function replaceParentPackage(Package $package, Package $parent): void
$this->replaceParentClassesInDirectory($directory);
}
} else {
$directory = $this->workingDir . $this->config->get('classmap_directory') . $parent->config->get('name');
$directory = $this->workingDir .
$this->config->get('classmap_directory') . $parent->config->get('name');

if ($autoloader instanceof NamespaceAutoloader) {
$this->replaceInDirectory($autoloader, $directory);

0 comments on commit 18ddaa2

Please sign in to comment.