-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Update PDO parameter names #6272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ | |
class PDOStatement implements IteratorAggregate | ||
{ | ||
/** @return bool */ | ||
public function bindColumn(string|int $column, mixed &$param, int $type = 0, int $max_length = 0, mixed $driver_options = null) {} | ||
public function bindColumn(string|int $column, mixed &$var, int $type = 0, int $maxLength = 0, mixed $driverOptions = null) {} | ||
|
||
/** @return bool */ | ||
public function bindParam(string|int $param, mixed &$bind_var, int $type = PDO::PARAM_STR, int $max_length = 0, mixed $driver_options = null) {} | ||
public function bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null) {} | ||
|
||
/** @return bool */ | ||
public function bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR) {} | ||
|
@@ -29,25 +29,25 @@ public function errorCode() {} | |
public function errorInfo() {} | ||
|
||
/** @return bool */ | ||
public function execute(?array $input_parameters = null) {} | ||
public function execute(?array $params = null) {} | ||
|
||
/** @return mixed */ | ||
public function fetch(int $mode = PDO::FETCH_BOTH, int $cursor_orientation = PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {} | ||
public function fetch(int $mode = PDO::FETCH_BOTH, int $cursorOrientation = PDO::FETCH_ORI_NEXT, int $cursorOffset = 0) {} | ||
|
||
/** @return array */ | ||
public function fetchAll(int $mode = PDO::FETCH_BOTH, mixed ...$args) {} | ||
|
||
/** @return mixed */ | ||
public function fetchColumn(int $index = 0) {} | ||
public function fetchColumn(int $column = 0) {} | ||
|
||
/** @return mixed */ | ||
public function fetchObject(?string $class = "stdClass", ?array $constructor_args = null) {} | ||
public function fetchObject(?string $class = "stdClass", ?array $ctorArgs = null) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason why this can't be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could also be a $constructorArgs. I prefer the shorter version a bit, but don't insist on it :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO |
||
|
||
/** @return mixed */ | ||
public function getAttribute(int $name) {} | ||
|
||
/** @return array|false */ | ||
public function getColumnMeta(int $index) {} | ||
public function getColumnMeta(int $column) {} | ||
|
||
/** @return bool */ | ||
public function nextRowset() {} | ||
|
@@ -59,7 +59,7 @@ public function rowCount() {} | |
public function setAttribute(int $attribute, mixed $value) {} | ||
|
||
/** @return bool */ | ||
public function setFetchMode(int $mode, mixed ...$fetch_mode_args) {} | ||
public function setFetchMode(int $mode, mixed ...$args) {} | ||
|
||
public function getIterator(): Iterator {} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should update ext/mysqli $index usage to $column as well (e.g.
php-src/ext/mysqli/mysqli.stub.php
Line 340 in faea5ab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what the best course of action would be :(