Skip to content

Commit e99658f

Browse files
committed
QA: Replace spl_object_hash() -> spl_object_id()
1 parent 6a1a070 commit e99658f

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/php/web/Application.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function service($request, $response) {
114114
public function toString() { return nameof($this).'('.$this->environment->docroot().')'; }
115115

116116
/** @return string */
117-
public function hashCode() { return spl_object_hash($this); }
117+
public function hashCode() { return spl_object_id($this); }
118118

119119
/**
120120
* Comparison

src/main/php/web/Request.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function toString() {
342342
}
343343

344344
/** @return string */
345-
public function hashCode() { return spl_object_hash($this); }
345+
public function hashCode() { return spl_object_id($this); }
346346

347347
/**
348348
* Compares this request

src/main/php/web/io/Part.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public abstract function kind();
2626
public function name() { return $this->name; }
2727

2828
/** @return string */
29-
public function hashCode() { return spl_object_hash($this); }
29+
public function hashCode() { return spl_object_id($this); }
3030

3131
/**
3232
* Compares this part to a given value

src/test/php/web/unittest/RequestTest.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function string_representation() {
355355
#[Test]
356356
public function hash_code() {
357357
$req= new Request(new TestInput('GET', '/', ['Host' => 'localhost', 'Connection' => 'close']));
358-
Assert::equals(spl_object_hash($req), $req->hashCode());
358+
Assert::equals(spl_object_id($req), $req->hashCode());
359359
}
360360

361361
#[Test]

0 commit comments

Comments
 (0)