This commit is contained in:
2020-12-17 14:09:14 +08:00
parent 672a719dbd
commit 36c1d0502a
151 changed files with 1937 additions and 2848 deletions
+3 -3
View File
@@ -22,10 +22,10 @@ class HasMany extends HasBase
/**
* @param $name
* @param $arguments
* @return mixed
* @return static
* @throws Exception
*/
public function __call($name, $arguments)
public function __call($name, $arguments): static
{
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
return $this;
@@ -35,7 +35,7 @@ class HasMany extends HasBase
* @return array|null|ActiveRecord
* @throws Exception
*/
public function get()
public function get(): array|ActiveRecord|null
{
return $this->_relation->get($this->model::className(), $this->value);
}