| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ColumnValueList extends ColumnList |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * {@inheritdoc} |
||
| 9 | * |
||
| 10 | * @param array $columns The list of columns to declare |
||
| 11 | * The key into the array is the name of the column. |
||
| 12 | * The value is the column value. |
||
| 13 | */ |
||
| 14 | public function __invoke(array $columns) |
||
| 15 | { |
||
| 16 | $this->invokeCheckIsDisabled(); |
||
| 17 | |||
| 18 | $usedClass = \BfwSql\UsedClass::getInstance(); |
||
| 19 | $columnClass = $usedClass->obtainClassNameToUse('QueriesPartsColumn'); |
||
| 20 | |||
| 21 | foreach ($columns as $name => $value) { |
||
| 22 | $this->list[] = new $columnClass($this->table, $name, null, $value); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function generate(): string |
||
| 47 | } |
||
| 48 | } |
||
| 49 |