This commit is contained in:
2021-11-30 22:33:41 -03:00
parent f589ff960b
commit bbee033a8a
8 changed files with 168 additions and 11 deletions

View File

@ -21,7 +21,7 @@ interface Model {
* @param array $definitions array of conditions for connecting to the child table
* @return array|null
*/
public function parentOf(string $child_class, array $definitions): ?array;
public function parentOf(string $child_class, array $definitions): bool|array;
/**
* Get parent model of class {$parent_class}
@ -29,7 +29,7 @@ interface Model {
* @param array $definitions array of conditions for connecting to the parent table
* @return Model|null
*/
public function childOf(string $parent_class, array $definitions): ?Model;
public function childOf(string $parent_class, array $definitions): bool|Model;
/**
* Get all siblings of class {$sibling_class}