Skip to content

Commit 36c982e

Browse files
committed
Don’t require PHP 7.1
1 parent 3814c9d commit 36c982e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ protected function castToClass($key)
522522
return $this->classCastCache[$key];
523523
}
524524

525-
[$type, $attributes] = $this->getClassCast($key);
525+
list($type, $attributes) = $this->getClassCast($key);
526526

527527
if ($attributes) {
528528
$parameters = array_map(function ($key) {
@@ -563,7 +563,7 @@ protected function mergeAttributesFromClassCasts()
563563
{
564564
foreach ($this->getCasts() as $attribute => $cast) {
565565
if ($this->isClassCastable($attribute)) {
566-
[$type, $attributes] = $this->getClassCast($attribute);
566+
list($type, $attributes) = $this->getClassCast($attribute);
567567

568568
$attributeCount = count($attributes);
569569
$object = $this->castToClass($attribute);
@@ -649,7 +649,7 @@ public function setAttribute($key, $value)
649649
protected function setClassCastableAttribute($key, $value)
650650
{
651651
if (is_null($value)) {
652-
[$cast, $attributes] = $this->getClassCast($key);
652+
list($cast, $attributes) = $this->getClassCast($key);
653653

654654
$this->attributes = array_merge(
655655
$this->attributes,

0 commit comments

Comments
 (0)