Code Duplication    Length = 6-6 lines in 2 locations

src/Card.php 1 location

@@ 404-409 (lines=6) @@
401
            ]);
402
        }
403
404
        if (! str_empty($this->icon)) {
405
            $card['icon'] = str_array_filter([
406
                'url' => $this->icon,
407
                'url@2x' => $this->icon2,
408
            ]);
409
        }
410
411
        if (! empty($this->attributes)) {
412
            $card['attributes'] = array_map(function (CardAttribute $attribute) {

src/CardAttribute.php 1 location

@@ 139-144 (lines=6) @@
136
            ]),
137
        ];
138
139
        if (! str_empty($this->icon)) {
140
            $attribute['value']['icon'] = str_array_filter([
141
                'url' => $this->icon,
142
                'url@2x' => $this->icon2,
143
            ]);
144
        }
145
146
        if (! str_empty($this->label)) {
147
            $attribute['label'] = $this->label;