From d7306dedb74208a7544aa9eb4baa73312cb77b43 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Wed, 1 Nov 2017 17:20:12 +0100 Subject: [PATCH] array_build => array_map --- src/User/User.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/User/User.php b/src/User/User.php index e33c58493..cde9e256f 100755 --- a/src/User/User.php +++ b/src/User/User.php @@ -484,9 +484,9 @@ class User extends AbstractModel */ public function getPreferencesAttribute($value) { - $defaults = array_build(static::$preferences, function ($key, $value) { - return [$key, $value['default']]; - }); + $defaults = array_map(function ($value) { + return $value['default']; + }, static::$preferences); $user = array_only((array) json_decode($value, true), array_keys(static::$preferences));