/** * @param Where $where * @param string $method * @param string $operation * * @return array */ protected function writeWhereIn(Where $where, $method, $operation) { $collection = []; foreach ($where->{$method}() as $column => $values) { $newColumn = array($column); $column = SyntaxFactory::createColumn($newColumn, $where->getTable()); $column = $this->columnWriter->writeColumn($column); $values = $this->writer->writeValues($values); $values = implode(", ", $values); $collection[] = "({$column} {$operation} ({$values}))"; } return $collection; }