Skip to content

Commit abe2206

Browse files
author
rkr
committed
- Minor change: Changed the parameter-signature of DatabaseStatement::fetchAll
1 parent 5cec8cc commit abe2206

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/Builder/QueryStatement.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ public function execute(array $params = []) {
5252
}
5353

5454
/**
55+
* @param int $fetchStyle
56+
* @param mixed $fetchArgument
57+
* @param array $ctorArgs
5558
* @return array
5659
*/
57-
public function fetchAll() {
58-
$args = func_get_args();
59-
return $this->exceptionHandler(function() use ($args) {
60-
return call_user_func_array([$this->statement, 'fetchAll'], $args);
60+
public function fetchAll($fetchStyle = PDO::FETCH_ASSOC, $fetchArgument = null, array $ctorArgs = []) {
61+
return $this->exceptionHandler(function() use ($fetchStyle, $fetchArgument, $ctorArgs) {
62+
return $this->statement->fetchAll($fetchStyle, $fetchArgument, $ctorArgs);
6163
});
6264
}
6365

src/Database/DatabaseStatement.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ public function getStatement();
1717
public function execute(array $params = []);
1818

1919
/**
20+
* @param int $fetchStyle
21+
* @param mixed $fetchArgument
22+
* @param array $ctorArgs
2023
* @return array
2124
*/
22-
public function fetchAll();
25+
public function fetchAll($fetchStyle = PDO::FETCH_ASSOC, $fetchArgument = null, array $ctorArgs = []);
2326

2427
/**
2528
* @param int $fetchStyle

0 commit comments

Comments
 (0)