Skip to content

Commit 24ff74c

Browse files
committed
Added return type attribute for PHP 8.1 (related to #162)
1 parent d625c89 commit 24ff74c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/LeanMapper/Reflection/EntityReflection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public function getAliases(): Aliases
114114
/**
115115
* Gets parent entity's reflection
116116
*/
117+
#[\ReturnTypeWillChange]
117118
public function getParentClass(): ?self
118119
{
119120
return ($reflection = parent::getParentClass()) ? new self($reflection->getName(), $this->mapper, $this->entityReflectionProvider) : null;
@@ -125,6 +126,7 @@ public function getParentClass(): ?self
125126
*
126127
* @return string|false
127128
*/
129+
#[\ReturnTypeWillChange]
128130
public function getDocComment()
129131
{
130132
if ($this->docComment === null) {

src/LeanMapper/Result.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,7 @@ public function __wakeup()
616616
/**
617617
* @return mixed
618618
*/
619+
#[\ReturnTypeWillChange]
619620
public function current()
620621
{
621622
$key = current($this->keys);
@@ -632,6 +633,7 @@ public function next(): void
632633
/**
633634
* @return mixed
634635
*/
636+
#[\ReturnTypeWillChange]
635637
public function key()
636638
{
637639
return current($this->keys);

src/LeanMapper/ResultProxy.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function setReferencingResult(Result $referencingResult, string $table, ?
5555
/**
5656
* @return mixed
5757
*/
58+
#[\ReturnTypeWillChange]
5859
public function current()
5960
{
6061
return $this->result->current();
@@ -70,6 +71,7 @@ public function next(): void
7071
/**
7172
* @return mixed
7273
*/
74+
#[\ReturnTypeWillChange]
7375
public function key()
7476
{
7577
return $this->result->key();

0 commit comments

Comments
 (0)