Maurício Meneghini Fauth
1be42d13de
Create the Identifiers\Identifier interface
...
Changes Dbal\DatabaseName, Dbal\TableName and Triggers\TriggerName to
implements the new Identifier\Identifier interface.
Moves Dbal\DatabaseName, Dbal\TableName and Triggers\TriggerName to the
Identifiers namespace.
Renames the tryFromValue() and fromValue() methods to just tryFrom() and
from() respectively.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-06-01 19:09:25 -03:00
Kamil Tekiela
c13f68ccc7
Remove strlen in boolean conditions
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-05-12 17:45:07 +01:00
Maurício Meneghini Fauth
6a2c12bdc8
Add missing traversable type hints
...
Replace array type hint with mixed[] type hint, since it means the same.
This way it's possible to require traversable type hint for new code.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-04-02 01:32:12 -03:00
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
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
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
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
Kamil Tekiela
7354773dfa
Replace escapeString with quoteString ( #17946 )
...
* Replace escapeString with quoteString
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
* Fix SQL injection
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-04 12:20:16 -03:00
Umang Patel
fdb5528648
Use Database type instead of string ( #17746 )
...
* Refactored tryColumnCreationQuery function inside CreateAddField to use DatabaseName type instead of string
* Refactored exportDatabase and lockTables function to use DatabaseName type instead of string for database name
Signed-off-by: Umang Patel <umang.patel@healthengine.com.au>
Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-20 21:34:10 -03:00
Maurício Meneghini Fauth
3890d11dd8
Fix some coding style issues
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-16 17:18:54 -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
Kamil Tekiela
5b471e7c64
Redesign CreateAddField::setColumnCreationStatementSuffix()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 22:24:49 +00:00
Kamil Tekiela
ca089b43ab
Redesign CreateAddField::tryColumnCreationQuery()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 18:27:26 +00:00
Kamil Tekiela
ce820ed522
Redesign CreateAddField::getColumnCreationStatements()
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-08 18:27:26 +00: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
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
William Desportes
c71c11e787
Remove an exit by moving out the preview SQL code on table create add field
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-03-11 21:09:46 +01: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
William Desportes
5abcae9255
Fixed some typos in the code base
...
I used code spell checker and did all the libraries/classes/*.php files one by one.
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-11-01 22:46:01 +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
cbaa67ea6c
Fix some type errors detected by PHPStan
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-02 14:11:58 -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
a3147c26e1
Extract exit; from Core::previewSQL method
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-09 16:20:41 -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
cfc17e56ea
Fix some potential bugs after my last commit
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 01:43:57 +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
William Desportes
81a2504780
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-03-19 23:41:17 +01:00
William Desportes
ca42395ee4
Fix #15898 - escape tbl_storage_engine argument
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-02-28 23:11:47 +01: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
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
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
Kartik Kathuria
9054d1f673
Added LOCK=NONE
...
Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com>
2020-01-17 20:42:09 +05:30
William Desportes
e17a787acc
Merge #15420 - Add #15312 Implement ONLINE transaction (ALGORITHM=INPLACE)
...
Pull-request: #15420
Fixes : #15312
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-17 14:05:42 +01:00
Kartik Kathuria
a439082dba
Change ALTER ONLINE to ALGORITHM=INPLACE at required position
...
Signed-off-by: Kartik Kathuria <kathuriakartik0@gmail.com>
2020-01-17 13:36:06 +05:30
Maurício Meneghini Fauth
10395f9ea8
Create Table\AddFieldController controller
...
Moves the add field entry point logic the controller and removes the
entry point file.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-23 20:51:40 -03:00
Maurício Meneghini Fauth
f6a17433a2
Use null coalesce operator when possible
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-11 20:16:58 -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
Hugues Peccatte
3255e4ad7b
Split Util class regarding the responsabilities ( #15567 )
...
PhpMyAdmin\Util is a very huge class with a lot of responsabilities.
There is a lot of work to split it, but this may be just a small start, waiting for a more normalized code.
* Split Util class regarding the responsabilities
* Split the buttonOrImage function
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-11-21 20:20:05 -03:00
William Desportes
acba81e091
Merge branch 'QA_5_0'
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-10 21:06:25 +01:00
William Desportes
df0543694c
Merge branch 'QA_4_9' into QA_5_0
...
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-10 20:54:15 +01:00
William Desportes
8aad190ae0
Fix #14951 - Moving Columns with DEFAULT NULL doesn't work on MariaDB 10.2+
...
Ref: 98a7479174
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-09 23:08:54 +01:00