Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit d84f305

Browse files
Improve (and unify) parameter name
1 parent cfc8ea0 commit d84f305

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Detector/Strategy/SuffixTree/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ abstract public function __toString(): string;
3030

3131
abstract public function hashCode(): int;
3232

33-
abstract public function equals(self $obj): bool;
33+
abstract public function equals(self $other): bool;
3434
}

src/Detector/Strategy/SuffixTree/Sentinel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ public function hashCode(): int
4040
return $this->hash;
4141
}
4242

43-
public function equals(AbstractToken $obj): bool
43+
public function equals(AbstractToken $other): bool
4444
{
4545
// Original code uses physical object equality, not present in PHP.
46-
return $obj instanceof self;
46+
return $other instanceof self;
4747
}
4848
}

src/Detector/Strategy/SuffixTree/Token.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function hashCode(): int
3535
return crc32($this->content);
3636
}
3737

38-
public function equals(AbstractToken $token): bool
38+
public function equals(AbstractToken $other): bool
3939
{
40-
return $token->hashCode() === $this->hashCode();
40+
return $other->hashCode() === $this->hashCode();
4141
}
4242
}

0 commit comments

Comments
 (0)