Skip to content

Commit

Permalink
Fix lint action (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingimmick authored Jan 10, 2022
1 parent bb91935 commit 6883a76
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
$parameters->set(
Option::PATHS,
[
__DIR__ . '/bin',
__DIR__ . '/config',
__DIR__ . '/fixed',
__DIR__ . '/src',
Expand Down
1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
$parameters->set(
Option::PATHS,
[
__DIR__ . '/bin',
__DIR__ . '/config',
__DIR__ . '/fixed',
__DIR__ . '/src',
Expand Down
6 changes: 3 additions & 3 deletions src/PHPCodeSnifferRuleSetGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ final class PHPCodeSnifferRuleSetGenerator
/**
* @var \Zing\CodingStandard\Printers\RuleSetPrinter
*/
private $printer;
private $ruleSetPrinter;

public function __construct(RuleSetPrinter $printer)
{
$this->printer = $printer;
$this->ruleSetPrinter = $printer;
}

public function generate(): void
Expand All @@ -50,7 +50,7 @@ public function generate(): void

file_put_contents(
sprintf(__DIR__ . '/../config/set/php_codesniffer/%s', self::MAP[$setDefinition->getRelativePath()]),
$this->printer->print($this->formatRulesToServices($ruleset))
$this->ruleSetPrinter->print($this->formatRulesToServices($ruleset))
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/PhpCsFixerRuleSetGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ final class PhpCsFixerRuleSetGenerator
/**
* @var \Zing\CodingStandard\Printers\RuleSetPrinter
*/
private $printer;
private $ruleSetPrinter;

public function __construct(RuleSetPrinter $printer)
{
$this->printer = $printer;
$this->ruleSetPrinter = $printer;
}

public function generate(): void
Expand All @@ -74,7 +74,7 @@ public function generate(): void
$fixerFactory->registerBuiltInFixers();
file_put_contents(
sprintf(__DIR__ . '/../config/set/php-cs-fixer/%s', self::MAP[$setDefinition->getName()]),
$this->printer->print($this->formatRulesToServices($fixerFactory, $setDefinition))
$this->ruleSetPrinter->print($this->formatRulesToServices($fixerFactory, $setDefinition))
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Printers/PHPCodeSnifferRuleSetPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PhpParser\Node\Expr;

class PHPCodeSnifferRuleSetPrinter extends RuleSetPrinter
final class PHPCodeSnifferRuleSetPrinter extends RuleSetPrinter
{
public function configureService(Expr $expr, array $configuration): Expr
{
Expand Down
2 changes: 1 addition & 1 deletion src/Printers/PhpCsFixerRuleSetPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PhpParser\Node\Expr;

class PhpCsFixerRuleSetPrinter extends RuleSetPrinter
final class PhpCsFixerRuleSetPrinter extends RuleSetPrinter
{
public function configureService(Expr $expr, array $configuration): Expr
{
Expand Down

0 comments on commit 6883a76

Please sign in to comment.