Skip to content

Commit b5c8c91

Browse files
mrabbaniclaude
andcommitted
Fix PHP 7.4 compatibility: replace static return type with self
The `static` return type requires PHP 8.0+ but the package supports PHP 7.4+. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 069ff8c commit b5c8c91

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/DataLayer/Model/BaseModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public static function delete_by( array $data ): bool {
360360
*
361361
* @return static|null The populated model, or null if not found.
362362
*/
363-
public static function find( int $id ): ?static {
363+
public static function find( int $id ): ?self {
364364
$store = DataLayerFactory::make_store( static::class );
365365

366366
if ( ! $store ) {

src/DataLayer/QueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
*
7272
* @return static
7373
*/
74-
public static function from_array( array $result ): static {
74+
public static function from_array( array $result ): self {
7575
return new static(
7676
is_array( $result['items'] ) ? $result['items'] : [],
7777
(int) $result['total'],

0 commit comments

Comments
 (0)