• 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/Strategy/SuffixTree/Token.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Systemsdk\PhpCPD\Detector\Strategy\SuffixTree;
6

7
class Token extends AbstractToken
8
{
9
    public function __construct(
10
        int $tokenCode,
11
        string $tokenName,
12
        int $line,
13
        string $file,
14
        string $content
15
    ) {
16
        $this->tokenCode = $tokenCode;
1✔
17
        $this->tokenName = $tokenName;
1✔
18
        $this->line = $line;
1✔
19
        $this->content = $content;
1✔
20
        $this->file = $file;
1✔
21
    }
22

23
    public function __toString(): string
24
    {
UNCOV
25
        return $this->tokenName;
×
26
    }
27

28
    public function hashCode(): int
29
    {
30
        return crc32($this->content);
1✔
31
    }
32

33
    public function equals(AbstractToken $other): bool
34
    {
35
        return $other->hashCode() === $this->hashCode();
1✔
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