Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/CLI/Arguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ public function __construct(
private readonly ?string $algorithm,
private readonly int $editDistance,
private readonly int $headEquality
)
{
) {
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/CodeClone.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function lines(string $indent = ''): string
$this->lines = implode(
'',
array_map(
static fn(string $line): string => $indent.$line,
static fn (string $line): string => $indent.$line,
\array_slice(
file($file->name()),
$file->startLine() - 1,
Expand Down
2 changes: 1 addition & 1 deletion src/CodeCloneMapIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(CodeCloneMap $clones)

usort(
$this->clones,
static fn(CodeClone $a, CodeClone $b): int => $a->numberOfLines() <=> $b->numberOfLines()
static fn (CodeClone $a, CodeClone $b): int => $a->numberOfLines() <=> $b->numberOfLines()
);

$this->clones = array_reverse($this->clones);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function findClones(int $minLength, int $maxErrors, int $headEquality): a

/** @var CloneInfo[] $values */
$values = array_values($map);
usort($values, static fn(CloneInfo $a, CloneInfo $b): int => $b->length - $a->length);
usort($values, static fn (CloneInfo $a, CloneInfo $b): int => $b->length - $a->length);

return $values;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Detector/Strategy/SuffixTree/CloneInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CloneInfo
public function __construct(int $length, int $position, /**
* Number of occurrences of the clone.
*/
private readonly int $occurrences, AbstractToken $token, PairList $otherClones)
private readonly int $occurrences, AbstractToken $token, PairList $otherClones)
{
$this->length = $length;
$this->position = $position;
Expand Down
2 changes: 1 addition & 1 deletion src/Detector/Strategy/SuffixTree/SuffixTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class SuffixTree
public function __construct(/**
* The word we are working on.
*/
protected $word)
protected $word)
{
$size = \count($word);
$this->INFTY = $size;
Expand Down