Since $struct is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $struct to at least protected.
Loading history...
19
static::$struct = static::createStruct();
20
}
21
return static::$struct;
22
}
23
24
public static function createStruct():TableStruct
25
{
26
return (new TableStructBuilder(static::class))->createStruct();
The expression return new suda\orm\stru...:class)->createStruct() returns the type suda\orm\TableStruct which is incompatible with the type-hinted return suda\orm\struct\TableStruct.