• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

keradus / PHP-CS-Fixer / 17253253998

26 Aug 2025 11:47PM UTC coverage: 94.683% (+0.01%) from 94.669%
17253253998

push

github

web-flow
Merge branch 'master' into __win

264 of 276 new or added lines in 36 files covered. (95.65%)

3 existing lines in 1 file now uncovered.

28313 of 29903 relevant lines covered (94.68%)

45.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/src/Console/Command/CheckCommand.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of PHP CS Fixer.
7
 *
8
 * (c) Fabien Potencier <fabien@symfony.com>
9
 *     Dariusz RumiƄski <dariusz.ruminski@gmail.com>
10
 *
11
 * This source file is subject to the MIT license that is bundled
12
 * with this source code in the file LICENSE.
13
 */
14

15
namespace PhpCsFixer\Console\Command;
16

17
use PhpCsFixer\Preg;
18
use PhpCsFixer\ToolInfoInterface;
19
use Symfony\Component\Console\Attribute\AsCommand;
20
use Symfony\Component\Console\Input\InputInterface;
21
use Symfony\Component\Console\Input\InputOption;
22

23
/**
24
 * @author Greg Korba <greg@codito.dev>
25
 *
26
 * @internal
27
 */
28
#[AsCommand(name: 'check', description: 'Checks if configured files/directories comply with configured rules.')]
29
final class CheckCommand extends FixCommand
30
{
31
    /** @TODO PHP 8.0 - remove the property */
32
    protected static $defaultName = 'check'; // @phpstan-ignore property.parentPropertyFinalByPhpDoc
33

34
    /** @TODO PHP 8.0 - remove the property */
35
    protected static $defaultDescription = 'Checks if configured files/directories comply with configured rules.'; // @phpstan-ignore property.parentPropertyFinalByPhpDoc
36

37
    public function __construct(ToolInfoInterface $toolInfo)
38
    {
39
        parent::__construct($toolInfo);
1✔
40
    }
41

42
    public function getHelp(): string
43
    {
NEW
44
        return Preg::replace('@\v\V*<comment>--dry-run</comment>\V*\v@', '', parent::getHelp());
×
45
    }
46

47
    protected function configure(): void
48
    {
49
        parent::configure();
1✔
50

51
        $this->setDefinition([
1✔
52
            ...array_values($this->getDefinition()->getArguments()),
1✔
53
            ...array_values(array_filter(
1✔
54
                $this->getDefinition()->getOptions(),
1✔
55
                static fn (InputOption $option): bool => 'dry-run' !== $option->getName()
1✔
56
            )),
1✔
57
        ]);
1✔
58
    }
59

60
    protected function isDryRun(InputInterface $input): bool
61
    {
62
        return true;
×
63
    }
64
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc