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

systemsdk / phpcpd / #31

16 Feb 2026 08:55PM UTC coverage: 78.378% (+2.6%) from 75.818%
#31

push

DKravtsov
### Added

* Added `--ignore-no-files option` to return a success exit code if no files were found.
* Added `#[SuppressCpd]` to ignore code clones inside a class or method (`use Systemsdk\PhpCPD\Attributes\SuppressCpd;`).

### Updated

* Improved Suffix Tree-based algorithm for code clone detection.
* Updated Dev environment: Updated XDebug, Phing, dev composer dependencies.

129 of 150 new or added lines in 6 files covered. (86.0%)

2 existing lines in 2 files now uncovered.

841 of 1073 relevant lines covered (78.38%)

8.49 hits per line

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

40.0
/src/Cli/Arguments.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Systemsdk\PhpCPD\Cli;
6

7
final readonly class Arguments
8
{
9
    /**
10
     * @param array<int, string> $directories
11
     * @param array<int, string> $suffixes
12
     * @param array<int, string> $exclude
13
     */
14
    public function __construct(
15
        private array $directories,
16
        private array $suffixes,
17
        private array $exclude,
18
        private ?string $pmdCpdXmlLogfile,
19
        private int $linesThreshold,
20
        private int $tokensThreshold,
21
        private bool $fuzzy,
22
        private bool $verbose,
23
        private bool $help,
24
        private bool $version,
25
        private string $algorithm,
26
        private int $editDistance,
27
        private int $headEquality,
28
        private bool $ignoreNoFiles
29
    ) {
30
    }
25✔
31

32
    /**
33
     * @return array<int, string>
34
     */
35
    public function directories(): array
36
    {
37
        return $this->directories;
×
38
    }
39

40
    /**
41
     * @return array<int, string>
42
     */
43
    public function suffixes(): array
44
    {
45
        return $this->suffixes;
×
46
    }
47

48
    /**
49
     * @return array<int, string>
50
     */
51
    public function exclude(): array
52
    {
53
        return $this->exclude;
×
54
    }
55

56
    public function pmdCpdXmlLogfile(): ?string
57
    {
58
        return $this->pmdCpdXmlLogfile;
×
59
    }
60

61
    public function linesThreshold(): int
62
    {
63
        return $this->linesThreshold;
25✔
64
    }
65

66
    public function tokensThreshold(): int
67
    {
68
        return $this->tokensThreshold;
25✔
69
    }
70

71
    public function fuzzy(): bool
72
    {
73
        return $this->fuzzy;
25✔
74
    }
75

76
    public function verbose(): bool
77
    {
78
        return $this->verbose;
×
79
    }
80

81
    public function help(): bool
82
    {
83
        return $this->help;
×
84
    }
85

86
    public function version(): bool
87
    {
88
        return $this->version;
×
89
    }
90

91
    public function algorithm(): string
92
    {
93
        return $this->algorithm;
×
94
    }
95

96
    public function editDistance(): int
97
    {
98
        return $this->editDistance;
25✔
99
    }
100

101
    public function headEquality(): int
102
    {
103
        return $this->headEquality;
25✔
104
    }
105

106
    public function ignoreNoFiles(): bool
107
    {
NEW
108
        return $this->ignoreNoFiles;
×
109
    }
110
}
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