Skip to content

Conversation

artengin
Copy link
Contributor

Refs: #67

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18585764876

Details

  • 194 of 199 (97.49%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 96.46%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Commands/InitCommand.php 169 174 97.13%
Totals Coverage Status
Change from base Build 18500891215: 0.3%
Covered Lines: 327
Relevant Lines: 339

💛 - Coveralls

@DenTray DenTray requested a review from Copilot October 20, 2025 06:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the InitCommand class by extracting README generation logic into a dedicated ReadmeGenerator class, improving code organization and maintainability.

Key Changes:

  • Introduced ReadmeGenerator class to handle all README-related operations
  • Reorganized InitCommand properties and methods for better logical grouping
  • Updated test mocks to reflect the new separation of concerns

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/Generators/ReadmeGenerator.php New class extracting README generation logic from InitCommand
src/Commands/InitCommand.php Refactored to use ReadmeGenerator and reorganized method/property order
tests/InitCommandTest.php Updated mocks to separate InitCommand and ReadmeGenerator namespace calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$this->callFileGetContent($this->generateResourcePath('md/readme/CONTACTS.md'), $this->getReadmeTemplateContent('CONTACTS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/ENVIRONMENTS.md'), $this->getReadmeTemplateContent('ENVIRONMENTS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/CREDENTIALS_AND_ACCESS.md'), $this->getReadmeTemplateContent('CREDENTIALS_AND_ACCESS.md')),

Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line contains trailing whitespace. Remove the whitespace to maintain code cleanliness.

Suggested change

Copilot uses AI. Check for mistakes.

$this->callFileGetContent($this->generateResourcePath('md/readme/ENVIRONMENTS.md'), $this->getReadmeTemplateContent('ENVIRONMENTS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/CREDENTIALS_AND_ACCESS.md'), $this->getReadmeTemplateContent('CREDENTIALS_AND_ACCESS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/RENOVATE.md'), $this->getReadmeTemplateContent('RENOVATE.md')),

Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line contains trailing whitespace. Remove the whitespace to maintain code cleanliness.

Suggested change

Copilot uses AI. Check for mistakes.

$this->callFileGetContent($this->generateResourcePath('md/readme/CONTACTS.md'), $this->getReadmeTemplateContent('CONTACTS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/ENVIRONMENTS.md'), $this->getReadmeTemplateContent('ENVIRONMENTS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/CREDENTIALS_AND_ACCESS.md'), $this->getReadmeTemplateContent('CREDENTIALS_AND_ACCESS.md')),

Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line contains trailing whitespace. Remove the whitespace to maintain code cleanliness.

Suggested change

Copilot uses AI. Check for mistakes.

$this->callFileGetContent($this->generateResourcePath('md/readme/CREDENTIALS_AND_ACCESS.md'), $this->getReadmeTemplateContent('CREDENTIALS_AND_ACCESS.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/CLERK.md'), $this->getReadmeTemplateContent('CLERK.md')),
$this->callFileGetContent($this->generateResourcePath('md/readme/RENOVATE.md'), $this->getReadmeTemplateContent('RENOVATE.md')),

Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line contains trailing whitespace. Remove the whitespace to maintain code cleanliness.

Suggested change

Copilot uses AI. Check for mistakes.

}

protected function addArrayItemIfMissing(array &$data, string $path, string $value): void
protected function updateEnvFile(): void
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line contains trailing whitespace after the function signature. Remove the trailing space.

Suggested change
protected function updateEnvFile(): void
protected function updateEnvFile(): void

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants