Skip to content

Commit c28d377

Browse files
authored
Merge pull request #19 from NHZEX/path-1
调整 Collection 类 column 方法
2 parents 8ee16f3 + e02d9d8 commit c28d377

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,11 @@ public function whereNotBetween(string $field, $value)
473473
/**
474474
* 返回数据中指定的一列
475475
* @access public
476-
* @param string $columnKey 键名
477-
* @param string $indexKey 作为索引值的列
476+
* @param string|null $columnKey 键名
477+
* @param string|null $indexKey 作为索引值的列
478478
* @return array
479479
*/
480-
public function column(string $columnKey, string $indexKey = null)
480+
public function column(?string $columnKey, string $indexKey = null)
481481
{
482482
return array_column($this->items, $columnKey, $indexKey);
483483
}

0 commit comments

Comments
 (0)