Skip to content

Commit

Permalink
Merge pull request #55 from Trusted97/chore/fix-style
Browse files Browse the repository at this point in the history
chore: fixed style and add parellal run for phpcsfixer
  • Loading branch information
Trusted97 authored Sep 24, 2024
2 parents 19b3d4c + 86e3583 commit 67a0db1
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://editorconfig.org/

# Top-most EditorConfig file
root = true

# Set default charset and end of line (EOL) style
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Set PHP-specific rules
[*.php]
indent_style = space
indent_size = 4
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
Expand Down Expand Up @@ -36,4 +37,4 @@
'phpdoc_summary' => false,
'blank_line_between_import_groups' => false,
])
->setFinder($finder);
->setFinder($finder);
3 changes: 3 additions & 0 deletions docker/php-8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM php:8.1-cli-alpine3.16

COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 6
paths:
- src
- tests
4 changes: 2 additions & 2 deletions src/Helper/DirectoryCopyHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class DirectoryCopyHelper
{
public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
}

Expand All @@ -19,7 +19,7 @@ public function copyDirectory(
string $overrideCommentMessage,
string $skippedMessage,
string $sourceDirectory,
string $distDirectory
string $distDirectory,
): void {
$checkExists = $this->fs->exists($sourceDirectory);
$override = true;
Expand Down
4 changes: 2 additions & 2 deletions src/Helper/FileCopyHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FileCopyHelper
{
public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
}

Expand All @@ -20,7 +20,7 @@ public function copyFile(
string $overrideCommentMessage,
string $skippedMessage,
string $sourceFileDirectory,
string $distFileDirectory
string $distFileDirectory,
): void {
$checkExists = $this->fs->exists($sourceFileDirectory . $fileName);
$override = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Service/DockerSetupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DockerSetupService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->dockerComposePath = Path::normalize(DirectoryPath::DOCKER_COMPOSE->value);
$this->dockerDirectoryPath = Path::normalize(DirectoryPath::DOCKER->value);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/GithubInitService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GithubInitService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->githubDirectoryPath = Path::normalize(DirectoryPath::GITHUB->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/GithubIssueService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GithubIssueService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->githubIssueDirectoryPath = Path::normalize(DirectoryPath::ISSUE->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/GithubPullService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GithubPullService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->githubPullDirectoryPath = Path::normalize(DirectoryPath::PULL->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/GithubWorkflowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GithubWorkflowService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->workflowDirectoryPath = Path::normalize(DirectoryPath::WORKFLOW->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/PhpCsFixerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PhpCsFixerService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->workflowDirectoryPath = Path::normalize(DirectoryPath::WORKFLOW->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/PhpStanService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PhpStanService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->workflowDirectoryPath = Path::normalize(DirectoryPath::WORKFLOW->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down
2 changes: 1 addition & 1 deletion src/Service/PhpUnitService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PhpUnitService

public function __construct(
protected readonly SymfonyStyle $io,
protected readonly Filesystem $fs
protected readonly Filesystem $fs,
) {
$this->workflowDirectoryPath = Path::normalize(DirectoryPath::WORKFLOW->value);
$this->fileCopyHelper = new FileCopyHelper($this->io, $this->fs);
Expand Down

0 comments on commit 67a0db1

Please sign in to comment.