Maurício Meneghini Fauth
dd885dc7b8
Use single-line arrays when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-27 17:39:17 -03:00
Maurício Meneghini Fauth
77957a69a5
Add trailing comma for multi-line functions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-24 20:48:46 -03:00
Maurício Meneghini Fauth
47846068fa
Remove some useless comments
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 23:45:06 -03:00
Maurício Meneghini Fauth
785f8c1c00
Use constructor property promotion where possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 19:39:02 -03:00
Kamil Tekiela
8a1d6f1eaa
Convert var annotations to typed properties
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 21:31:04 +00:00
Maurício Meneghini Fauth
a52f50ad58
Merge branch 'standan-hulk-fix-phpstan-issues'
...
Resolves https://github.com/phpmyadmin/phpmyadmin/pull/17782
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-17 16:42:36 -03:00
Maurício Meneghini Fauth
4d1546f7c5
Fix indentation issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-16 13:41:31 -03:00
Daniel Platt
93cc48c33b
fix return type errors from phpstan - add more specific array types
...
Signed-off-by: Daniel Platt <82732185+standan-hulk@users.noreply.github.com>
2022-10-13 12:11:11 +02:00
Kamil Tekiela
a4b2d7e524
Deimplement fetchRow() helper
...
This helper isn't needed anymore.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-09 22:44:53 +00:00
Kamil Tekiela
47a039d70c
Implement ResultInterface & MysqliResult
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-31 23:59:24 +00:00
Maurício Meneghini Fauth
feca48cc76
Change return type of DatabaseInterface::getError method
...
Now, it returns last error message or an empty string instead of false
if no errors occurred.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-27 14:43:14 -03:00
Maurício Meneghini Fauth
f00d70cccb
Remove useless whitespaces
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-15 17:05:40 -03:00
Maurício Meneghini Fauth
1835ebb4fc
Replace mb_strpos !== false with str_contains
...
See: https://wiki.php.net/rfc/str_contains#case-insensitivity_and_multibyte_strings
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-10 13:43:40 -03:00
Maurício Meneghini Fauth
6ae07c96fb
Replace strpos !== false with str_contains
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-09 22:30:42 -03:00
William Desportes
db01d6a9da
Remove some else conditions by using early exits or moving code
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-29 01:18:39 +02:00
Maurício Meneghini Fauth
3a161651ea
Rename variables to use camel case format
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-07 14:58:49 -03:00
Maurício Meneghini Fauth
d83abf63e7
Use PSR-12 for control structures spacing
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 15:27:03 -03:00
Maurício Meneghini Fauth
0b8edc5bde
Use PSR-12 for namespace use statements
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-05 14:18:35 -03:00
Maurício Meneghini Fauth
e4e274976e
Extract cache methods from Util to SessionCache class
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-25 22:45:56 -03:00
Maurício Meneghini Fauth
bb32ba6d9c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-04 12:31:43 -03:00
Maurício Meneghini Fauth
f2e49a92c6
Fix some type errors detected by PHPStan
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-09-30 19:23:01 -03:00
William Desportes
e78eb340bc
Some code improvements and fixes related to issue reported by Scrutinizer
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-18 10:29:15 +02:00
Maurício Meneghini Fauth
3b285ff17e
Use identical operator for non-empty strings
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-10 18:06:29 -03:00
William Desportes
761045bcc9
Move getSystemSchemas and isSystemSchema to Query\Utilities
...
If you think the class name could be better, feel free to improve it.
Everybody know naming classes is difficult ^^
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-31 01:42:53 +02:00
Maurício Meneghini Fauth
f4582e083e
Use early exit when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 00:35:24 -03:00
Maurício Meneghini Fauth
82c2964bb8
Remove useless elses
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 22:27:45 -03:00
Maurício Meneghini Fauth
3ae05c785d
Use short list syntax and single line arrays
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 03:32:59 -03:00
Maurício Meneghini Fauth
3baad2eb1c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
Maurício Meneghini Fauth
8dd310fb6a
Remove assignments in if conditions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-16 01:35:19 -03:00
Maurício Meneghini Fauth
206199105e
Remove useless return type annotations
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 13:03:29 -03:00
Maurício Meneghini Fauth
676f48349a
Reference global funcs and consts via use statement
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 22:13:36 -03:00
Maurício Meneghini Fauth
42166cac37
Remove use statements within the same namespace
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 19:47:56 -03:00
Maurício Meneghini Fauth
f80d3e3bd4
Remove unnecessary annotations
...
@package, @subpackage and others.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 17:35:56 -03:00
Maurício Meneghini Fauth
6283caaabf
Use one line for comments with a single line
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 16:04:09 -03:00
Maurício Meneghini Fauth
c231652c67
Remove useless comments in PHP docs
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 14:38:49 -03:00
Maurício Meneghini Fauth
39f42f848b
Remove some useless docblock comments
...
Fixes docblock spacing
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-13 21:15:00 -03:00
Maurício Meneghini Fauth
dd06cd38f8
Defines rules for double quote usage
...
Makes sure that any use of double quotes strings are warranted.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-01 14:10:07 -03:00
Maurício Meneghini Fauth
1a14b3e4d3
Remove vim modelines
...
These settings are no longer required as they are guaranteed through
other coding standard tools.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-09-02 09:43:21 -03:00
Maurício Meneghini Fauth
7eb2bbc102
Remove libraries/check_user_privileges.inc.php
...
Replaces with CheckUserPrivileges::getPrivileges
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-22 18:18:21 -02:00
Hugues Peccatte
f06883d2a7
Remove useless parenthesis
...
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-20 01:23:53 +01:00
Hugues Peccatte
f1e140be05
Reduce nested ifs
...
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-01-12 23:06:04 +01:00
Maurício Meneghini Fauth
23c3579804
Format array declarations
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 14:31:39 -02:00
Maurício Meneghini Fauth
4cee0cbc12
Adds space after not (!) and type cast
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-05 21:56:34 -02:00
Rishwanth Yeddula
1aed791258
Ensure that database names with '.' are handled properly when DisableIS is true
...
Closes : #13267
Signed-off-by: Rishwanth Yeddula <rish@cpanel.net>
2018-09-12 15:24:59 -03:00
Maurício Meneghini Fauth
285e38e931
Fix some PSR-2 coding standard errors
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96
Use short array syntax instead of long array syntax
...
Replaces array() with [].
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
6cf8ee0831
Enable strict mode in some classes
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-15 01:03:57 -03:00
Maurício Meneghini Fauth
ed765042d3
Add type declarations for CheckUserPrivileges
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-17 21:49:21 -03:00
Maurício Meneghini Fauth
26a6581380
Replace static methods with instance methods
...
Replace PhpMyAdmin\CheckUserPrivileges static methods with instance methods.
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-15 13:56:08 -03:00
Maurício Meneghini Fauth
a2b08bae7b
Refactor check_user_privileges to static methods
...
Refactor check_user_privileges.lib.php functions to static methods and move logic to check_user_privileges.inc.php.
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-11 22:09:05 -03:00