Compare commits

..

1 commit

Author SHA1 Message Date
lionel-rowe
1fea41bec0
Merge 4b2a24ba5e into 04f2141a7d 2025-05-08 10:02:58 +08:00
8 changed files with 17 additions and 27 deletions

View file

@ -11,8 +11,6 @@
*
*/
namespace phpbb\Sniffs\Commenting;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -23,7 +21,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* @package code_sniffer
* @author Manuel Pichler <mapi@phpundercontrol.org>
*/
class FileCommentSniff implements Sniff
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff
{
/**
* Returns an array of tokens this test wants to listen for.

View file

@ -11,8 +11,6 @@
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -20,7 +18,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the opening brace of a control structures is on the line after.
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
*/
class OpeningBraceBsdAllmanSniff implements Sniff
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -10,7 +10,6 @@
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -19,7 +18,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that there is exactly one space between the keyword and the opening
* parenthesis of a control structures.
*/
class OpeningParenthesisSniff implements Sniff
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -11,8 +11,6 @@
*
*/
namespace phpbb\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
@ -20,7 +18,7 @@ use PHP_CodeSniffer\Sniffs\Sniff;
* Checks that the visibility qualifiers are placed after the static keyword
* according to the coding guidelines
*/
class StaticKeywordSniff implements Sniff
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
{
/**
* Registers the tokens that this sniff wants to listen for.

View file

@ -11,15 +11,13 @@
*
*/
namespace phpbb\Sniffs\Namespaces;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Checks that each use statement is used.
*/
class UnusedUseSniff implements Sniff
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
{
const FIND = [
T_NS_SEPARATOR,

View file

@ -17,6 +17,9 @@
<!-- There MUST not be more than one statement per line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Call-time pass-by-reference MUST not be used. -->
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
<!-- Filenames MUST be lowercase. -->
<rule ref="Generic.Files.LowercasedFilename" />

16
phpBB/composer.lock generated
View file

@ -4702,16 +4702,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.13.0",
"version": "3.10.1",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "65ff2489553b83b4597e89c3b8b721487011d186"
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/65ff2489553b83b4597e89c3b8b721487011d186",
"reference": "65ff2489553b83b4597e89c3b8b721487011d186",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877",
"shasum": ""
},
"require": {
@ -4776,13 +4776,9 @@
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
},
{
"url": "https://thanks.dev/u/gh/phpcsstandards",
"type": "thanks_dev"
}
],
"time": "2025-05-11T03:36:00+00:00"
"time": "2024-05-22T21:24:41+00:00"
},
{
"name": "symfony/browser-kit",
@ -5110,5 +5106,5 @@
"platform-overrides": {
"php": "7.2"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.6.0"
}

View file

@ -70,12 +70,12 @@ class request implements \phpbb\request\request_interface
foreach ($this->super_globals as $const => $super_global)
{
$this->input[$const] = isset($GLOBALS[$super_global]) ? (array) $GLOBALS[$super_global] : array();
$this->input[$const] = isset($GLOBALS[$super_global]) ? $GLOBALS[$super_global] : array();
}
// simulate request_order = GP
$this->original_request = (array) $this->input[\phpbb\request\request_interface::REQUEST];
$this->input[\phpbb\request\request_interface::REQUEST] = (array) $this->input[\phpbb\request\request_interface::POST] + (array) $this->input[\phpbb\request\request_interface::GET];
$this->original_request = $this->input[\phpbb\request\request_interface::REQUEST];
$this->input[\phpbb\request\request_interface::REQUEST] = $this->input[\phpbb\request\request_interface::POST] + $this->input[\phpbb\request\request_interface::GET];
if ($disable_super_globals)
{