Skip to content

Commit

Permalink
Bump and run required PHP-CS-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Jun 4, 2024
1 parent e325d0a commit bd46037
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.3.2
=====

* (bug) Remove breaking rule.


1.3.1
=====

Expand Down
2 changes: 1 addition & 1 deletion _init/library/vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"21torr/php-cs-fixer": "^1.1",
"21torr/php-cs-fixer": "^1.1.1",
"roave/security-advisories": "dev-latest"
}
}
2 changes: 1 addition & 1 deletion _init/symfony/vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"21torr/php-cs-fixer": "^1.1",
"21torr/php-cs-fixer": "^1.1.1",
"roave/security-advisories": "dev-latest"
}
}
1 change: 1 addition & 0 deletions src/Command/InitializeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ protected function execute (InputInterface $input, OutputInterface $output) : in
catch (\Throwable $exception)
{
$io->error("Running janus failed: {$exception->getMessage()}");

return 2;
}
}
Expand Down
17 changes: 7 additions & 10 deletions src/Initializer/InitializeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct (
private TorrStyle $io,
)
{
$this->cwd = (string) \getcwd();
$this->cwd = (string) getcwd();
}

/**
Expand All @@ -36,7 +36,6 @@ public function copyFilesIntoProject (string $directory) : void
]);
}


/**
* Add the given config to the projects composer.json
*
Expand All @@ -60,8 +59,8 @@ public function addToProjectComposerJson (array $config) : void
* If there are multiple lines matching, all will be replaced.
* If there are no lines matching, the call will just be appended.
*
* @param string $key The scripts key to update.
* @param array<string, string> $scripts The scripts to replace.
* @param string $key the scripts key to update
* @param array<string, string> $scripts the scripts to replace
*/
public function updateProjectComposerJsonScripts (string $key, array $scripts) : void
{
Expand Down Expand Up @@ -107,7 +106,7 @@ private function writeProjectComposerJson (array $config) : void

file_put_contents(
$filePath,
\json_encode(
json_encode(
$config,
\JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_THROW_ON_ERROR,
),
Expand All @@ -121,16 +120,16 @@ private function readProjectComposerJson () : array
{
$filePath = "{$this->cwd}/composer.json";

$result = \json_decode(
(string) \file_get_contents($filePath),
$result = json_decode(
(string) file_get_contents($filePath),
true,
flags: \JSON_THROW_ON_ERROR,
);
\assert(\is_array($result));

return $result;
}


/**
* Runs a composer command in the project
*
Expand All @@ -151,7 +150,6 @@ public function runComposerInProject (array $cmd) : void
$this->runProcessInProject($cmd);
}


/**
* Runs the given command in the project directory
*
Expand Down Expand Up @@ -180,5 +178,4 @@ public function runProcessInProject (array $cmd) : void
);
}
}

}
2 changes: 1 addition & 1 deletion vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"21torr/php-cs-fixer": "^1.0.2",
"21torr/php-cs-fixer": "^1.1.1",
"roave/security-advisories": "dev-latest"
}
}

0 comments on commit bd46037

Please sign in to comment.