Kamil Tekiela
b0acbd3c60
Check whether ob_gzhandler is already in use
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-03-13 14:38:55 +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
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
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
ccb11368cd
Remove OutputBuffering::getInstance() method
...
The OutputBuffering class is only used inside the ResponseRendering
class and since it's already a singleton, there is no reason to use the
OutputBuffering class as a singleton as well.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-25 14:04:07 -03:00
Maurício Meneghini Fauth
7f6472b2c2
Add void return type where possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-13 15:29:11 -03:00
Maurício Meneghini Fauth
c985faf9a1
Build response headers before sending them out
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-01 16:08:03 -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
William Desportes
d63a72ad51
Fixes #16278 - Remove underscore prefix from property names
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-08-06 15:46:39 +02:00
Maurício Meneghini Fauth
2358b9c4f9
Fix missing property type hints
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-22 21:42:22 -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
charliewindred
ca3c5e17b0
Remove underscore prefix from method names
...
Removed underscore from method names for PSR-12 compliance.
Signed-off-by: charliewindred <charliewindred@gmail.com>
2020-06-02 16:44:16 +01: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
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
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
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
3f7204beb7
Add coding standard rule for self reference
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-19 23:31:20 -03:00
William Desportes
5f13152857
Fix some PHPStan level 3 errors
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-12-06 09:02:41 +01: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
e49d46b277
Merge branch 'QA_4_8'
...
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-28 14:51:43 -02:00
William Desportes
9c28e42216
Fix #14478 - phpMyAdmin no longer streams the export data
...
Fixes : #14478
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-01-14 17:32:10 +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
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
119563b7ea
Move classes to PhpMyAdmin namespace
...
- Move OpenDocument to PhpMyAdmin namespace
- Move OutputBuffering to PhpMyAdmin namespace
- Move Partition to PhpMyAdmin namespace
- Move Pdf class to PhpMyAdmin namespace
- Move RecentFavoriteTable to PhpMyAdmin namespace
- Move Response to PhpMyAdmin namespace
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-06-30 23:44:10 -03:00