mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 03:24:01 +02:00
PHPStan: Fix level 2 errors
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Adminer;
|
||||
|
||||
class Adminer {
|
||||
public $operators; ///< @var list<string> operators used in select, null for all operators
|
||||
public $error = ''; ///< @var protected(set) string HTML
|
||||
public $error = ''; ///< @var string @visibility protected(set) string HTML
|
||||
|
||||
/** Name in title and navigation
|
||||
* @return string HTML code
|
||||
@@ -22,7 +22,7 @@ class Adminer {
|
||||
}
|
||||
|
||||
/** Get SSL connection options
|
||||
* @return ?string[]
|
||||
* @return string[]|void
|
||||
*/
|
||||
function connectSsl() {
|
||||
}
|
||||
@@ -221,7 +221,6 @@ class Adminer {
|
||||
* @param string
|
||||
* @param string
|
||||
* @return BackwardKey[]
|
||||
* @phpstan-type BackwardKey array{name:string, keys:string[][]}
|
||||
*/
|
||||
function backwardKeys($table, $tableName) {
|
||||
return array();
|
||||
@@ -289,7 +288,7 @@ class Adminer {
|
||||
/** Get a link to use in select table
|
||||
* @param string raw value of the field
|
||||
* @param Field single field returned from fields()
|
||||
* @return ?string null to create the default link
|
||||
* @return string|void null to create the default link
|
||||
*/
|
||||
function selectLink($val, $field) {
|
||||
}
|
||||
|
@@ -61,14 +61,14 @@ abstract class SqlDriver {
|
||||
|
||||
/** Get enum values
|
||||
* @param Field
|
||||
* @return ?string
|
||||
* @return string|void
|
||||
*/
|
||||
function enumLength($field) {
|
||||
}
|
||||
|
||||
/** Function used to convert the value inputted by user
|
||||
* @param Field
|
||||
* @return ?string
|
||||
* @return string|void
|
||||
*/
|
||||
function unconvertFunction($field) {
|
||||
}
|
||||
@@ -187,7 +187,7 @@ abstract class SqlDriver {
|
||||
/** Return query with a timeout
|
||||
* @param string
|
||||
* @param int seconds
|
||||
* @return ?string null if the driver doesn't support query timeouts
|
||||
* @return string|void null if the driver doesn't support query timeouts
|
||||
*/
|
||||
function slowQuery($query, $timeout) {
|
||||
}
|
||||
@@ -231,7 +231,7 @@ abstract class SqlDriver {
|
||||
}
|
||||
|
||||
/** Get warnings about the last command
|
||||
* @return ?string HTML
|
||||
* @return string|void HTML
|
||||
*/
|
||||
function warnings() {
|
||||
}
|
||||
@@ -239,7 +239,7 @@ abstract class SqlDriver {
|
||||
/** Get help link for table
|
||||
* @param string
|
||||
* @param bool
|
||||
* @return ?string relative URL
|
||||
* @return string|void relative URL
|
||||
*/
|
||||
function tableHelp($name, $is_view = false) {
|
||||
}
|
||||
|
@@ -299,7 +299,7 @@ function default_value($field) {
|
||||
|
||||
/** Get type class to use in CSS
|
||||
* @param string
|
||||
* @return ?string class=''
|
||||
* @return string|void class=''
|
||||
*/
|
||||
function type_class($type) {
|
||||
foreach (
|
||||
|
@@ -274,7 +274,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
|
||||
/** Find unique identifier of a row
|
||||
* @param string[]
|
||||
* @param Index[] result of indexes()
|
||||
* @return ?string[] null if there is no unique identifier
|
||||
* @return string[]|void null if there is no unique identifier
|
||||
*/
|
||||
function unique_array($row, $indexes) {
|
||||
foreach ($indexes as $index) {
|
||||
|
@@ -343,7 +343,7 @@ function input($field, $value, $function, $autofocus = false) {
|
||||
}
|
||||
|
||||
/** Process edit input field
|
||||
* @param one field from fields()
|
||||
* @param Field one field from fields()
|
||||
* @return string or false to leave the original value
|
||||
*/
|
||||
function process_input($field) {
|
||||
@@ -417,7 +417,7 @@ function search_tables() {
|
||||
|
||||
/** Return events to display help on mouse over
|
||||
* @param string JS expression
|
||||
* @param bool JS expression
|
||||
* @param int JS expression
|
||||
* @return string
|
||||
*/
|
||||
function on_help($command, $side = 0) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
namespace Adminer;
|
||||
|
||||
class Plugins extends Adminer {
|
||||
public $plugins; ///< @var protected(set) array
|
||||
public $plugins; ///< @var list<object> @visibility protected(set)
|
||||
|
||||
/** Register plugins
|
||||
* @param list<object> object instances or null to autoload plugins from adminer-plugins/
|
||||
|
@@ -2,7 +2,8 @@
|
||||
namespace Adminer;
|
||||
|
||||
class TmpFile {
|
||||
private $handler, $size;
|
||||
private $handler;
|
||||
public $size; ///< @visibility protected(set)
|
||||
|
||||
function __construct() {
|
||||
$this->handler = tmpfile();
|
||||
|
Reference in New Issue
Block a user