Commit Graph

80 Commits

Author SHA1 Message Date
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
48f671d956
Replace get_class() with ::class constant
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-20 18:58:13 -03:00
Kamil Tekiela
87e42d591c Use short closures where possible
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 13:44:42 +00:00
Kamil Tekiela
8433f66447 Remove unused variable in catch
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 12:10:23 +00:00
Kamil Tekiela
1e4af77416
Refactor Plugins.php (#17960)
* Remove temporary variable

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Remove pass-by-ref

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Refactor getOneOption

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Refactor getOptions

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2022-12-14 23:16:27 -03:00
Maurício Meneghini Fauth
5ab7640bc7
Remove force_file_* global vars and param
Uses a HTML data attribute instead.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-21 17:30:55 -03:00
Maurício Meneghini Fauth
a2a3f6d26d
Create a factory for auth plugin creation
Extracts the factory method from the Plugins class into a new class.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-16 19:32:10 -03:00
Maurício Meneghini Fauth
0379fcc385
Remove the auth_plugin global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-16 16:51:22 -03:00
Maurício Meneghini Fauth
a6b7e5ef28
Remove exit construct from Plugins::getAuthPlugin()
Throws exception for invalid auth plugin instead of exiting.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-11-16 16:25:51 -03:00
Maurício Meneghini Fauth
de03f00cae
Remove Core::fatalError method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-10-31 22:18:47 -03:00
Maurício Meneghini Fauth
bb97ed988f
Reduce usage of the containerBuilder global variable
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-09-29 22:36:46 -03:00
Maurício Meneghini Fauth
7be4a9fb51
Improve type inference in Plugins::getPlugins method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-21 15:26:11 -03:00
Maurício Meneghini Fauth
a4f8c18808
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-20 14:48:45 -03:00
Maurício Meneghini Fauth
43cfe7d256
Mark Plugins\Plugin::isAvailable as static method
Allows for checking the availability before creating a new instance.

- Fixes https://github.com/phpmyadmin/phpmyadmin/issues/17519

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2022-05-20 14:17:57 -03:00
Rodrigo Pokemaobr
be976e4b57 Adjusting parameters in ExportPlugin class
Signed-off-by: Rodrigo Pokemaobr <contato@pokemaobr.dev>
2022-04-28 16:32:06 -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
f446e6da88 Remove unused variables
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-12-03 15:12:56 +00:00
Maurício Meneghini Fauth
fbd5b0a67c
Redesign the export/import pages to use Bootstrap components
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-11-25 13:37:47 -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
f0d9da85f2
Improve type check of Plugins::getDefault method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-27 14:56:12 -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
8e4d6229a9
Fix some errors found by Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-07-06 00:37:27 -03:00
Maurício Meneghini Fauth
92dc790d78
Refactor PhpMyAdmin\Plugins::getPlugins method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-28 23:18:44 -03:00
Maurício Meneghini Fauth
1129b68d29
Refactor PhpMyAdmin\Plugins::getPlugin method
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-25 17:40:20 -03:00
Maurício Meneghini Fauth
21431578db
Fix some errors found by PHPStan and Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-24 18:03:14 -03:00
Maurício Meneghini Fauth
8319f88ecf
Fix some errors found by PHPStan
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-06-22 17:12:02 -03:00
William Desportes
66d0fecb90
Merge branch 'origin/QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-16 01:22:53 +02:00
William Desportes
4443570e46
Remove useless dir sep from #16967
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-16 01:20:10 +02:00
William Desportes
300e835edb
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-16 01:10:11 +02:00
William Desportes
f09ead5e07
Fix code using relative path
if (chdir('/tmp') === false) {
    die('Could not change dir');
}

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-06-15 22:24:30 +02: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
Maurício Meneghini Fauth
9928882de3
Fix some errors found by Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-05-23 00:24:59 -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
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
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
65f6fc3c6e Extract method to get the auth plugin
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-07-24 20:36:22 -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
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
2d02a15de3 Add static to closures that don't use $this
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 18:30:57 -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
5aef97207b
Do not use strict equals with class names
Ref: ec3efe8a1e

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 14:16:03 +02:00
William Desportes
ec3efe8a1e
Use ::class in Plugin class
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-20 12:15:50 +02:00
William Desportes
0138cb471f
Some minor code improvements
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-17 22:29:57 +02: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
84139f4d51 Remove some useless variables
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 16:15: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
William Desportes
cc82f092ce
Fix MissingClosureParamType errors
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-04-29 01:08:40 +02: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