This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
9
10
/** @var array|Column[] */
11
private $columns;
12
13
/**
14
* @param array|Column[] $columns
15
*/
16
public function __construct(array $columns) {
17
$this->columns = $columns;
18
}
19
20
/**
21
* @param RendererRegistry $renderers
22
* @return Element
23
*/
24
public function render(RendererRegistry $renderers) {
25
return new Element('div', ['class' => 'row'], array_map(function (Column $column) use ($renderers) {
26
return $column->render($renderers);
27
}, $this->columns));
28
}
29
30
/**
31
* @param RendererRegistry $renderers
32
* @return \rtens\domin\delivery\web\Element[]
33
*/
34
public function headElements(RendererRegistry $renderers) {
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.