Maurício Meneghini Fauth
8972c0ec22
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-03-24 18:15:47 -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
e9b9c120af
Fix getTablesFull() and related tests
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-15 19:59:35 +00:00
Kamil Tekiela
3db245f462
Optimize export of many tables
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-15 19:59:35 +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
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
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
Kamil Tekiela
cfe54a501b
Add union types
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 15:23:28 +00:00
Kamil Tekiela
2b35303aae
Remove redundant code ( #18063 )
...
PHPStorm has been a little annoying with showing all these code issues. I took some time to analyse most of them and fix whichever were easy to fix. This kind of change should improve future maintenance as developers do not need to wonder what a line of code does. Code that has no impact on functionality should be removed.
* Remove redundant variables
* Invert condition for better clarity
* Remove some of the redundant casts
* Replace switch with an if
* Fix foreach variable
* Remove redundant variable concat
* Remove redundant concats
* Replace for loop with str_repeat
* Remove always true param
* Turn property $position into local var
* Turn Pdf properties into local vars
* Remove unused properties in Pdf
* Change ternary into condition
* Remove redundant assignments
They are immediately overwritten with a different value.
* Redundant array append
* Collapse if statements into assignments
* Use boolean constants instead of variables
* Remove unneeded parameter
* Remove null-coalesce
* Unnecessary assignment
* Remove redundant isset
* Remove readOnly flag for InsertEdit fields
* Remove function_exists and $mode var
* Remove duplicate condition
* Remove redundant elseif
* Remove redundant isset
* Use hasBodyParam()
* Simplify isRoutesCacheFileValid()
Psalm complains but is wrong.
https://github.com/phpmyadmin/phpmyadmin/pull/18063
---------
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 09:11:05 -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
8d0c2a339c
Move both operands of an assignment to the same line
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-04-20 22:35:21 -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
199e3d9813
Fix coding standard issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-27 21:08:55 -03:00
William Desportes
4d61ef2313
Split some code out of DatabaseInterface
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-26 13:18:01 +02:00