Commit Graph

68 Commits

Author SHA1 Message Date
Maurício Meneghini Fauth
44fe103b9c
Remove @access annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-12-22 11:43:45 -03:00
Maurício Meneghini Fauth
3e0856c77b
Remove useless string concatenations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-27 21:40:22 -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
9f3510d11a
Add bool return type where possible
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-09-14 20:11:51 -03:00
Maurício Meneghini Fauth
04d3c83559
Fix some errors found by PHPStan/Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-08-05 16:09:08 -03:00
William Desportes
9373c8ec70
Merge branch 'QA_5_1'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-22 14:51:35 +02:00
William Desportes
d281dcc0bd
Fix #17026 - Handle possible invalid boolean values injected in SaveDir or UploadDir
Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-07-22 12:59:54 +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
William Desportes
7852d1d8da
Remove 15 years old (and now useless) function exists check on file_get_contents
Introduced by: d3f335ac3d
And moved afterwards by: f49b5d24cf

Now useless, the function always exists and it was the only place where the existence was checked

Signed-off-by: William Desportes <williamdes@wdes.fr>
2021-05-21 00:22:53 +02:00
Maurício Meneghini Fauth
7e33d227f5
Rename the PMA_Config global variable to config
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-03-08 15:03:12 -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
7994eb3ac6
Fix some errors found by Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-02-10 17:12:11 -03:00
Maurício Meneghini Fauth
494387a5ea
Fix some errors found by Psalm
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2021-01-19 19:23:13 -03:00
Maurício Meneghini Fauth
e66be179ca Use camel case naming for class members
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-10-05 10:37:07 -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
9d6bc6f641 Merge branch 'QA_5_0'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-16 22:09:53 -03:00
Maurício Meneghini Fauth
3b285ddc3a Fix PHP error when exporting without php-zip
Fixes #14326 (Export database with zip compression: Class 'ZipArchive'
not found error).

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-08-16 21:36:54 -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
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
bd979dd1ff Remove useless elseif with if
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 22:53:44 -03:00
Maurício Meneghini Fauth
82c2964bb8 Remove useless elses
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-26 22:27:45 -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
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
dda060f92e Replace file upload error codes with PHP contants
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-05-13 16:57:14 -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
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
e1c69c6a14 Reference global funcs and consts via use statement
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-22 00:26:45 -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
42166cac37 Remove use statements within the same namespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-21 19:47:56 -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
Maurício Meneghini Fauth
8ec4209002 Fix some coding standard issues
- Inverts yoda comparisons
- Removes parentheses from return
- Removes useless ternary operators
- Adds paretheses to new instances
- Adds trailing array comma

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 00:38:34 -03:00
Maurício Meneghini Fauth
285907991e Add coding standard rules for whitespace
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-19 22:29:54 -03:00
William Desportes
249ee4dbd2
Improve JS and phpdoc by removing useless spaces
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-16 18:39:42 +01:00
Maurício Meneghini Fauth
39f42f848b Remove some useless docblock comments
Fixes docblock spacing

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-12-13 21:15:00 -03:00
William Desportes
eda044cbac
Improve code after Scrutinizer report
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-11 21:33:25 +01:00
William Desportes
7f0949ad00
Merge branch 'QA_5_0'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-11 20:54:26 +01:00
William Desportes
5a83a289d8
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-11 20:31:34 +01:00
William Desportes
003ec4daf3
Fix #14809 - php error is_uploaded_file() expects parameter 1 to be string
Fixes: #14809

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-11-10 23:05:16 +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
Hugues Peccatte
07f3a152cc Fix failure on blob insert (#15407)
Due to strict_mode enabling, is_uploaded_file doesn't allow anymore a NULL value.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-08-02 20:22:28 -03:00
Hugues Peccatte
9c0806cfcf Fix static / non-static calls
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-07-16 23:21:25 -03:00
William Desportes
6cc352ac12
phpstan level 3 fixes
21 errors left

Signed-off-by: William Desportes <williamdes@wdes.fr>
2019-06-22 14:37:38 +02:00
Maurício Meneghini Fauth
c8f84fc748 Replace is_null with identical comparison with null
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 13:28:22 -03:00
William Desportes
bcefdd79fa
phpstan level 2 - Fix phpdoc
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-11-25 13:57:55 +01:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00