1<?php 2/** 3 * `UNION` keyword builder. 4 */ 5 6declare(strict_types=1); 7 8namespace PhpMyAdmin\SqlParser\Components; 9 10use PhpMyAdmin\SqlParser\Component; 11 12use function implode; 13 14/** 15 * `UNION` keyword builder. 16 * 17 * @final 18 */ 19class UnionKeyword extends Component 20{ 21 /** 22 * @param array<UnionKeyword[]> $component the component to be built 23 * @param array $options parameters for building 24 * 25 * @return string 26 */ 27 public static function build($component, array $options = []) 28 { 29 $tmp = []; 30 foreach ($component as $componentPart) { 31 $tmp[] = $componentPart[0] . ' ' . $componentPart[1]; 32 } 33 34 return implode(' ', $tmp); 35 } 36} 37