Skip to content

Commit 226a709

Browse files
committed
Add missing return types
1 parent 4da2a92 commit 226a709

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Eloquent/Model.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected function getAttributeFromArray($key)
187187
/**
188188
* @inheritdoc
189189
*/
190-
public function setAttribute($key, $value)
190+
public function setAttribute($key, $value): static
191191
{
192192
// Convert _id to ObjectID.
193193
if ($key == '_id' && is_string($value)) {
@@ -516,13 +516,9 @@ public function __call($method, $parameters)
516516
}
517517

518518
/**
519-
* Add the casted attributes to the attributes array.
520-
*
521-
* @param array $attributes
522-
* @param array $mutatedAttributes
523-
* @return array
519+
* @inheritdoc
524520
*/
525-
protected function addCastAttributesToArray(array $attributes, array $mutatedAttributes)
521+
protected function addCastAttributesToArray(array $attributes, array $mutatedAttributes): array
526522
{
527523
foreach ($this->getCasts() as $key => $castType) {
528524
if (! Arr::has($attributes, $key) || Arr::has($mutatedAttributes, $key)) {

0 commit comments

Comments
 (0)