This commit is contained in:
2023-12-18 16:09:21 +08:00
parent abb561f185
commit 7f98be6b1c
+3 -3
View File
@@ -577,7 +577,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
* @return null * @return null
* @throws * @throws
*/ */
public function getAttribute(string $name) public function getAttribute(string $name): mixed
{ {
return $this->_attributes[$name] ?? NULL; return $this->_attributes[$name] ?? NULL;
} }
@@ -833,10 +833,10 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, \
* @param string $field * @param string $field
* @return array * @return array
*/ */
public function getOldAttribute(string $field): array public function getOldAttribute(string $field): mixed
{ {
// TODO: Implement getOldAttribute() method. // TODO: Implement getOldAttribute() method.
return $this->_oldAttributes; return $this->_oldAttributes[$field] ?? null;
} }
} }