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
+2 -2
View File
@@ -24,7 +24,7 @@ class HasOne extends HasBase
* @return $this
* @throws Exception
*/
public function __call($name, $arguments)
public function __call($name, $arguments): static
{
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
return $this;
@@ -34,7 +34,7 @@ class HasOne extends HasBase
* @return array|null|ActiveRecord
* @throws Exception
*/
public function get()
public function get(): array|ActiveRecord|null
{
return $this->_relation->first($this->model::className(), $this->value);
}