/** Convert field in select and edit
* @param Field one element from fields()
- * @return string
+ * @return ?string
*/
function convert_field($field) {
if (preg_match("~binary~", $field["type"])) {
return $return;
}
- function warnings() {
- return ''; // not implemented in PDO_PgSQL as of PHP 7.2.1
- }
+ // warnings() not implemented in PDO_PgSQL as of PHP 7.2.1
function close() {
}
}
/** Get SSL connection options
- * @return string[] or null
+ * @return ?string[]
*/
function connectSsl() {
}
/** Get a link to use in select table
* @param string raw value of the field
* @param Field single field returned from fields()
- * @return string or null to create the default link
+ * @return ?string null to create the default link
*/
function selectLink($val, $field) {
}
/** Get enum values
* @param Field
- * @return string or null
+ * @return ?string
*/
function enumLength($field) {
}
/** Function used to convert the value inputted by user
* @param Field
- * @return string or null
+ * @return ?string
*/
function unconvertFunction($field) {
}
/** Return query with a timeout
* @param string
* @param int seconds
- * @return string or null if the driver doesn't support query timeouts
+ * @return ?string null if the driver doesn't support query timeouts
*/
function slowQuery($query, $timeout) {
}
}
/** Get warnings about the last command
- * @return string HTML
+ * @return ?string HTML
*/
function warnings() {
- return '';
}
/** Get help link for table
* @param string
* @param bool
- * @return string relative URL or null
+ * @return ?string relative URL
*/
function tableHelp($name, $is_view = false) {
}
/** Get type class to use in CSS
* @param string
-* @return string class=''
+* @return ?string class=''
*/
function type_class($type) {
foreach (
}
/** Get a possibly missing item from a possibly missing array
-* idx($row, $key) is better than $row[$key] ?? null because it reports error for undefined $row
-* @param array|null
+* idx($row, $key) is better than $row[$key] ?? null because PHP will report error for undefined $row
+* @param ?array
* @param string|int
* @param mixed
* @return mixed
/** Find unique identifier of a row
* @param string[]
* @param Index[] result of indexes()
-* @return string[] or null if there is no unique identifier
+* @return ?string[] null if there is no unique identifier
*/
function unique_array($row, $indexes) {
foreach ($indexes as $index) {
* @param string
* @param string
* @param int number of seconds, 0 for session cookie, 2592000 - 30 days
-* @return bool
+* @return null
*/
function cookie($name, $value, $lifetime = 2592000) {
global $HTTPS;
- return header(
+ header(
"Set-Cookie: $name=" . urlencode($value)
. ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
. "; path=" . preg_replace('~\?.*~', '', $_SERVER["REQUEST_URI"])
/** Store settings to a cookie
* @param mixed[]
* @param string
-* @return bool
+* @return null
*/
function save_settings($settings, $cookie = "adminer_settings") {
- return cookie($cookie, http_build_query($settings + get_settings($cookie)));
+ cookie($cookie, http_build_query($settings + get_settings($cookie)));
}
/** Restart stopped session
/** Send Location header and exit
* @param string null to only set a message
* @param string
-* @return never
+* @return null
*/
function redirect($location, $message = null) {
if ($message !== null) {
--- /dev/null
+parameters:
+ level: 0
+ ignoreErrors:
+ - identifier: include.fileNotFound # relative includes
+ - identifier: includeOnce.fileNotFound # ./adminer-plugins.php
+ - "~^Function (set_magic_quotes_runtime|mysql_)~" # PHP < 7 functions
+ - "~^Instantiated class Adminer\\w~" # no support for classes defined inside function
+ paths:
+ - .
+ phpVersion:
+ min: 70100
+ max: 80499
+ checkMissingCallableSignature: true
$this->_link = ibase_connect($server, $username, $password);
if ($this->_link) {
$url_parts = explode(':', $server);
- $this->service_link = ibase_service_attach($url_parts[0], $username, $password);
- $this->server_info = ibase_server_info($this->service_link, IBASE_SVC_SERVER_VERSION);
+ $service_link = ibase_service_attach($url_parts[0], $username, $password);
+ $this->server_info = ibase_server_info($service_link, IBASE_SVC_SERVER_VERSION);
} else {
$this->errno = ibase_errcode();
$this->error = ibase_errmsg();
}
function expunge() {
- return imap_expunge();
+ return imap_expunge($this->imap);
}
}
}
function truncate_tables($tables) {
- return connection()->expunge($name);
+ return connection()->expunge();
}
function connect($credentials) {
}
function executeCommand($command) {
- return $this->executeDbCommand($this->_db_name);
+ return $this->executeDbCommand($this->_db_name, $command);
}
function executeDbCommand($db, $command) {