Skip to content

Commit 43920f5

Browse files
authored
Merge pull request #31 from stellarwp/8-2-deprecated-notices
Add ReturnTypeWillChange to suppress deprecated notices on PHP 8.1+
2 parents a202d1f + abb90a2 commit 43920f5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Schema/Fields/Collection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function count(): int {
4646
/**
4747
* @inheritDoc
4848
*/
49+
#[\ReturnTypeWillChange]
4950
public function current() {
5051
return current( $this->fields );
5152
}
@@ -101,20 +102,23 @@ public function offsetExists( $offset ): bool {
101102
/**
102103
* @inheritDoc
103104
*/
105+
#[\ReturnTypeWillChange]
104106
public function offsetGet( $offset ) {
105107
return $this->fields[ $offset ];
106108
}
107109

108110
/**
109111
* @inheritDoc
110112
*/
113+
#[\ReturnTypeWillChange]
111114
public function offsetSet( $offset, $value ): void {
112115
$this->fields[ $offset ] = $value;
113116
}
114117

115118
/**
116119
* @inheritDoc
117120
*/
121+
#[\ReturnTypeWillChange]
118122
public function offsetUnset( $offset ): void {
119123
unset( $this->fields[ $offset ] );
120124
}

src/Schema/Tables/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function count(): int {
4646
/**
4747
* @inheritDoc
4848
*/
49+
#[\ReturnTypeWillChange]
4950
public function current() {
5051
return current( $this->tables );
5152
}
@@ -114,6 +115,7 @@ public function offsetExists( $offset ): bool {
114115
/**
115116
* @inheritDoc
116117
*/
118+
#[\ReturnTypeWillChange]
117119
public function offsetGet( $offset ) {
118120
return $this->tables[ $offset ];
119121
}

0 commit comments

Comments
 (0)