Skip to content

Commit ac0dccc

Browse files
authored
add docblock
1 parent 73d7918 commit ac0dccc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/VirtualColumn.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,14 @@ public static function getCustomColumns(): array
140140
];
141141
}
142142

143+
/**
144+
* Get a column name for an attribute that can be used in SQL queries.
145+
*
146+
* (`foo` or `data->foo` depending on whether `foo` is in custom columns)
147+
*/
143148
public function getColumnForQuery(string $column): string
144149
{
145-
if (in_array($column, static::getCustomColumns())) {
150+
if (in_array($column, static::getCustomColumns(), true)) {
146151
return $column;
147152
}
148153

0 commit comments

Comments
 (0)