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

PHP-CS-Fixer / PHP-CS-Fixer / 3721300657

pending completion
3721300657

push

github

GitHub
minor: Follow PSR12 ordered imports in Symfony ruleset (#6712)

9 of 9 new or added lines in 2 files covered. (100.0%)

22674 of 24281 relevant lines covered (93.38%)

39.08 hits per line

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

0.0
/src/ConfigInterface.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;
16

17
use PhpCsFixer\Fixer\FixerInterface;
18

19
/**
20
 * @author Fabien Potencier <fabien@symfony.com>
21
 * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
22
 */
23
interface ConfigInterface
24
{
25
    /**
26
     * Returns the path to the cache file.
27
     *
28
     * @return null|string Returns null if not using cache
29
     */
30
    public function getCacheFile(): ?string;
×
31

32
    /**
33
     * Returns the custom fixers to use.
34
     *
35
     * @return FixerInterface[]
36
     */
37
    public function getCustomFixers(): array;
38

39
    /**
40
     * Returns files to scan.
41
     *
42
     * @return iterable<\SplFileInfo>
43
     */
44
    public function getFinder(): iterable;
45

46
    public function getFormat(): string;
47

48
    /**
49
     * Returns true if progress should be hidden.
50
     */
51
    public function getHideProgress(): bool;
52

53
    public function getIndent(): string;
54

55
    public function getLineEnding(): string;
56

57
    /**
58
     * Returns the name of the configuration.
59
     *
60
     * The name must be all lowercase and without any spaces.
61
     *
62
     * @return string The name of the configuration
63
     */
64
    public function getName(): string;
65

66
    /**
67
     * Get configured PHP executable, if any.
68
     */
69
    public function getPhpExecutable(): ?string;
×
70

71
    /**
72
     * Check if it is allowed to run risky fixers.
73
     */
74
    public function getRiskyAllowed(): bool;
75

76
    /**
77
     * Get rules.
78
     *
79
     * Keys of array are names of fixers/sets, values are true/false.
80
     *
81
     * @return array<string, array<string, mixed>|bool>
82
     */
83
    public function getRules(): array;
84

85
    /**
86
     * Returns true if caching should be enabled.
87
     */
88
    public function getUsingCache(): bool;
89

90
    /**
91
     * Adds a suite of custom fixers.
92
     *
93
     * Name of custom fixer should follow `VendorName/rule_name` convention.
94
     *
95
     * @param FixerInterface[]|iterable|\Traversable $fixers
96
     */
97
    public function registerCustomFixers(iterable $fixers): self;
98

99
    /**
100
     * Sets the path to the cache file.
101
     */
102
    public function setCacheFile(string $cacheFile): self;
103

104
    /**
105
     * @param iterable<\SplFileInfo> $finder
106
     */
107
    public function setFinder(iterable $finder): self;
108

109
    public function setFormat(string $format): self;
110

111
    public function setHideProgress(bool $hideProgress): self;
112

113
    public function setIndent(string $indent): self;
114

115
    public function setLineEnding(string $lineEnding): self;
116

117
    /**
118
     * Set PHP executable.
119
     */
120
    public function setPhpExecutable(?string $phpExecutable): self;
×
121

122
    /**
123
     * Set if it is allowed to run risky fixers.
124
     */
125
    public function setRiskyAllowed(bool $isRiskyAllowed): self;
126

127
    /**
128
     * Set rules.
129
     *
130
     * Keys of array are names of fixers or sets.
131
     * Value for set must be bool (turn it on or off).
132
     * Value for fixer may be bool (turn it on or off) or array of configuration
133
     * (turn it on and contains configuration for FixerInterface::configure method).
134
     *
135
     * @param array<string, array<string, mixed>|bool> $rules
136
     */
137
    public function setRules(array $rules): self;
138

139
    public function setUsingCache(bool $usingCache): self;
140
}
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

© 2025 Coveralls, Inc