Maurício Meneghini Fauth
437215cab2
Rename variables to use camel case format
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-26 21:47:50 -03:00
Kamil Tekiela
555c6798eb
Add native param types
...
Includes TypeHints.UnionTypeHintFormat
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-17 12:45:18 +00:00
Kamil Tekiela
0bdcaba2d2
Add native property types ( #18143 )
...
* Add native property types
Includes TypeHints.UnionTypeHintFormat
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Set some default values for properties
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Format and promote properties
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove redundant asserts
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Redundant cast
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* $tmanager->theme is never null
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Redundant variable
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix empty on $statementInfo bool
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Redundant casts
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Redundant issets
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* getPacked() returns nullable string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Redundant if
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* $this->content can be null
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Simplify ThemeManager::getInstance()
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use isset for checking if property is initialized
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use nullable instead of uninitialized property
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* password is no longer nullable
I can't verify that none of the globals ever tried to set it to null, but the variable should never be nullable.
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* $same_wide_width param can be float or int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update Message.php
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast Sub_part to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix one line doc comments
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-26 23:30:41 -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
Kamil Tekiela
e8c5eef6f8
Remove annoying empty statements ( #18114 )
...
* Remove annoying empty statements
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Make $extra strict and stop passing false to it
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Make $page strict and stop passing null
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-24 20:11:37 -03:00
Kamil Tekiela
902d1a1e77
Add native return type hints ( #18126 )
...
* Add remaining native return type hints to flush out bugs
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast the mixed value to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix tests
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* getAutoIncrement() is supposed to return string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast values to string in DummyResult
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Make getCollation() return non-nullable string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast seqInIndex to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Cast $cardinality to int
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* createFile may return false
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Remove redundant cast
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Update baselines
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-23 15:43:36 -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
4ff3724c3f
Use union with null instead of short nullable type
...
Since union type are now possible, using union with null makes more
clear that it is a union type.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 21:48:19 -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
Maurício Meneghini Fauth
613678f8f5
Replace assignments with null coalesce equal operator
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 17:03:05 -03:00
Kamil Tekiela
cb2e1932f8
Better array types part 1 ( #18096 )
...
* Plugins getScripts() return array of strings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* These methods always return an array
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* extractPrivInfo returns an array of strings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* getInfoPages returns an array of strings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* returnClassNamesFromMenuButtons returns a string map
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Use array shape for getDatabasesForSelectOptions
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Some methods in Table return array of strings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* getLines returns an array if ints
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Array shapes in TwoFactor
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* parseEnumSetValues always returns an array of strings
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 16:52:00 -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
Kamil Tekiela
7a22334167
Designer controller globals ( #17985 )
...
* Remove globals from DesignerController
* Remove $GLOBALS['params'] in ManageController
* Remove $GLOBALS['params']
* Remove $GLOBALS['total_num_tables']
* Remove $GLOBALS['tooltip_truename']
* Remove $GLOBALS['tooltip_aliasname']
* Remove $GLOBALS['pos']
* Remove $GLOBALS['tables'] (partially)
* Remove $GLOBALS['num_tables'] (partially)
* Remove redundant calls to Util::getDbInfo()
* Move unrelated functionality out of getDbInfo()
* Extract new method getTableListPosition()
* Code style changes
* Update phpstan-baseline.neon
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-01-26 22:58:24 -03:00
Kamil Tekiela
ba110e8638
Remove $GLOBALS['tab_pos']
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-20 18:55:03 +00:00
Kamil Tekiela
98902c87a8
Update Designer.php
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-11-02 15:15:58 +00:00
Kamil Tekiela
20ce0a8f2f
Refactor $GLOBALS['display_page']
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-10-15 20:15:50 +01:00
Maurício Meneghini Fauth
5950693fb3
Fix possible undefined globals
...
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17427 .
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-10 18:05:21 -03:00
Maurício Meneghini Fauth
1438cb211e
Replace global keyword with $GLOBALS
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-03-07 17:31:11 -03:00
Kamil Tekiela
f5bb90ebb9
Move queryAsControlUser - Dbal refactoring pt.3
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-06 19:31:27 +00:00
Kamil Tekiela
83b4dda1a3
Change QUERY_STORE to QUERY_BUFFERED
...
Set the value to 0 instead of 1 and remove all unnecessary usages of this constant
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-01-01 01:46:01 +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
d84af02945
Create VO classes for each RelationParameters features
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-26 19:17:58 -03:00
Maurício Meneghini Fauth
c411121fd8
Move Relation classes into the ConfigStorage namespace
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-17 12:09:13 -03:00
Maurício Meneghini Fauth
c4575fd48b
Add methods to check for RelationParameters features
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-11 08:10:40 -03:00
Maurício Meneghini Fauth
b2a51c4d84
Create the RelationParameters value object
...
Replaces the $cfgRelation array with the RelationParameters value
object.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-14 18:22:36 -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
86798ec45e
Refactor PhpMyAdmin\Plugins::getChoice method
...
Extracts the getDefault method from the getChoice method and adds a
getName method to the Plugin interface.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-27 13:38:01 -03:00
Maurício Meneghini Fauth
84d175b282
Extract HTML from Plugins::getChoice method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-25 15:29:43 -03:00
Maurício Meneghini Fauth
7a4536d4d6
Remove PhpMyAdmin\Twig\PluginsExtension class
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-25 11:00:21 -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
Maurício Meneghini Fauth
1c084de30b
Fix coding standard errors
...
Related to 62f142c9fa .
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-03 16:50:33 -03:00
William Desportes
8fbb01a684
Merge branch 'origin/QA_5_1'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-04-19 21:51:45 +02:00
Maurício Meneghini Fauth
59e4dae52a
Remove invalid inline doc comments
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-18 14:49:28 -03:00
Fawzi E. Abdulfattah
a4b7bbb334
support RTL mode - Designer
...
Signed-off-by: Fawzi E. Abdulfattah <iifawzie@gmail.com>
2021-04-16 00:02:53 +02: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
1e5fbd57fc
Create Twig\AssetExtension and image Twig function
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-28 16:09:17 -03:00
Paul Gomez
23e23e3b3b
Added "Build Query" button to Visual Query Builder #16485
...
There was a ```if not visual_builder ``` that kept it from displaying. I did a search to see if that value is supplied and what it would mean.
Signed-off-by: Paul Gomez <pauldro952@hotmail.com>
2020-12-31 23:22:50 +01:00
Maurício Meneghini Fauth
db3da81056
Remove some useless comments
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-13 19:56: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
65b79af29e
Refactor Plugins::getPlugins method
...
Replaces parameters with explicit methods.
- Plugins::getExport
- Plugins::getImport
- Plugins::getSchema
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-19 01:40:27 -03: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
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
3baad2eb1c
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-25 22:42:37 -03:00
William Desportes
9a95abd05f
Use declaration of global $dbi
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-16 12:03:29 +02:00
Maurício Meneghini Fauth
a64393e7f5
Fix some coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 00:23:28 -03:00
Maurício Meneghini Fauth
6584b01824
Use short versions of scalar types in PHP docs
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-23 12:20:04 -03:00
William Desportes
74da874164
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-23 12:44:00 +01:00
William Desportes
8a0f006775
Fix php notice "Trying to access array offset on value of type bool"
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-23 12:40:11 +01: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