Skip to content

Commit

Permalink
[TASK] Minor code cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed Apr 20, 2024
1 parent 76fc1d4 commit deddc30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function __construct(
*/
public function print(string $workingDirectory, array $directories): string
{
// 1. collect documented rules in provided path
$documentedRuleClasses = $this->classByTypeFinder->findByType(
$workingDirectory,
$directories,
Expand All @@ -42,12 +41,10 @@ public function print(string $workingDirectory, array $directories): string

$this->symfonyStyle->listing($classes);

// 2. create rule definition collection
$this->symfonyStyle->note('Resolving rule definitions');

$ruleDefinitions = $this->ruleDefinitionsResolver->resolveFromClassNames($documentedRuleClasses);

// 3. print rule definitions to markdown lines
$this->symfonyStyle->note('Printing rule definitions');
$markdownLines = $this->ruleDefinitionsPrinter->print($ruleDefinitions);

Expand Down
2 changes: 2 additions & 0 deletions fractor-doc-generator/src/Printer/Markdown/MarkdownDiffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ public function diff(string $old, string $new): string
if ($old === $new) {
return '';
}

$diff = $this->differ->diff($old, $new);
$diff = $this->clearUnifiedDiffOutputFirstLine($diff);
$diff = $this->removeTrailingWhitespaces($diff);

return $this->warpToDiffCode($diff);
}
/**
Expand Down

0 comments on commit deddc30

Please sign in to comment.