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

systemsdk / phpcpd / #4

30 Dec 2024 04:42PM UTC coverage: 75.789%. Remained the same
#4

push

DKravtsov
phpcpd 8.0.0 release. Made codebase refactoring. Updated requirements php 8.3, updated composer dependencies, updated tests to the PHPUnit 11. Updated dev environment to the php 8.4, Phing 3.0, added code quality tools: ecs, phpstan.

271 of 379 new or added lines in 20 files covered. (71.5%)

65 existing lines in 13 files now uncovered.

648 of 855 relevant lines covered (75.79%)

2.18 hits per line

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

87.5
/src/Detector/Detector.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Systemsdk\PhpCPD\Detector;
6

7
use Systemsdk\PhpCPD\CodeCloneMap;
8
use Systemsdk\PhpCPD\Detector\Strategy\AbstractStrategy;
9
use Systemsdk\PhpCPD\Exceptions\ProcessingResultException;
10

11
final class Detector
12
{
13
    public function __construct(
14
        private readonly AbstractStrategy $strategy
15
    ) {
16
    }
9✔
17

18
    /**
19
     * @param array<int, string> $files
20
     *
21
     * @throws ProcessingResultException
22
     */
23
    public function copyPasteDetection(array $files): CodeCloneMap
24
    {
25
        $result = new CodeCloneMap();
9✔
26
        foreach ($files as $file) {
9✔
27
            if (empty($file)) {
9✔
UNCOV
28
                continue;
×
29
            }
30

31
            $this->strategy->processFile($file, $result);
9✔
32
        }
33
        $this->strategy->postProcess();
9✔
34

35
        return $result;
9✔
36
    }
37
}
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