Files
This commit is contained in:
@ -39,7 +39,7 @@ abstract class Model extends BaseModel implements ModelInterface {
|
||||
}
|
||||
return $definitions;
|
||||
}
|
||||
public function parentOf(string $child_class, array $definitions): ?array {
|
||||
public function parentOf(string $child_class, array $definitions): bool|array {
|
||||
$definitions = $this->validateDefinitions(
|
||||
$definitions,
|
||||
[Model::CHILD_KEY, Model::SELF_KEY],
|
||||
@ -48,7 +48,7 @@ abstract class Model extends BaseModel implements ModelInterface {
|
||||
$where = [[$definitions[Model::CHILD_KEY], $this->{$definitions[Model::SELF_KEY]}]];
|
||||
return $this->factory->find($child_class)->where($where)->many();
|
||||
}
|
||||
public function childOf(string $parent_class, array $definitions): ?ModelInterface {
|
||||
public function childOf(string $parent_class, array $definitions): bool|ModelInterface {
|
||||
$definitions = $this->validateDefinitions(
|
||||
$definitions,
|
||||
[Model::PARENT_KEY, Model::SELF_KEY],
|
||||
|
Reference in New Issue
Block a user