Upgrade to 3.4.4

This commit is contained in:
Bastian Allgeier
2020-10-06 10:23:02 +02:00
parent c091f04115
commit 0b80361a79
53 changed files with 976 additions and 83 deletions

View File

@@ -22,11 +22,12 @@ class Fields extends Collection
* the collection prop on each object correctly.
*
* @param string $name
* @param object $field
* @param object|array $field
* @return self
*/
public function __set(string $name, $field)
{
if (is_array($field)) {
if (is_array($field) === true) {
// use the array key as name if the name is not set
$field['name'] = $field['name'] ?? $name;
$field = new Field($field['type'], $field);
@@ -40,7 +41,7 @@ class Fields extends Collection
* array and also does that for every
* included field.
*
* @param Closure $map
* @param \Closure|null $map
* @return array
*/
public function toArray(Closure $map = null): array