| @@ 116-129 (lines=14) @@ | ||
| 113 | * @param mixed $values |
|
| 114 | * @return $this |
|
| 115 | */ |
|
| 116 | private function whereIn($column, $values) |
|
| 117 | { |
|
| 118 | $bindings = []; |
|
| 119 | ||
| 120 | foreach ($values as $key => $value) { |
|
| 121 | $bindings[] = $binding = sprintf(':%s%s', $column, $key); |
|
| 122 | ||
| 123 | $this->bindings[$binding] = $value; |
|
| 124 | } |
|
| 125 | ||
| 126 | $this->queryBuilder->where($column, 'IN', $bindings); |
|
| 127 | ||
| 128 | return $this; |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * {@inheritdoc} |
|
| @@ 192-204 (lines=13) @@ | ||
| 189 | * @param array $values |
|
| 190 | * @return array the values array with bindings instead of values. |
|
| 191 | */ |
|
| 192 | private function replaceValuesWithBindings(array $values) |
|
| 193 | { |
|
| 194 | $result = []; |
|
| 195 | ||
| 196 | foreach ($values as $key => $value) { |
|
| 197 | $binding = sprintf(':%s', $key); |
|
| 198 | ||
| 199 | $this->bindings[$binding] = $value; |
|
| 200 | $result[$key] = $binding; |
|
| 201 | } |
|
| 202 | ||
| 203 | return $result; |
|
| 204 | } |
|
| 205 | } |
|
| 206 | ||