Code Duplication    Length = 13-14 lines in 2 locations

src/Config/Traits/FieldsAwareConfigTrait.php 1 location

@@ 78-90 (lines=13) @@
75
        return $this;
76
    }
77
78
    protected function buildFieldConfig($name, $info = null)
79
    {
80
        if (!is_array($info)) {
81
            $info = [
82
                'type' => $info,
83
                'name' => $name,
84
            ];
85
        } elseif (empty($info['name'])) {
86
            $info['name'] = $name;
87
        }
88
89
        return $info;
90
    }
91
92
    /**
93
     * @param $name

src/Config/Traits/ArgumentsAwareConfigTrait.php 1 location

@@ 55-68 (lines=14) @@
52
        return $this;
53
    }
54
55
    protected function buildConfig($name, $info = null)
56
    {
57
        if (!is_array($info)) {
58
            return [
59
                'type' => $info,
60
                'name' => $name
61
            ];
62
        }
63
        if (empty($info['name'])) {
64
            $info['name'] = $name;
65
        }
66
67
        return $info;
68
    }
69
70
    /**
71
     * @param $name