Skip to content

Commit 5e12e8b

Browse files
authored
Merge pull request phpbb#6816 from marc1706/ticket/17510-master
[ticket/17510] Fix Code Sniffer deprecations -- master version
2 parents 1f6f0a3 + ff6f3b2 commit 5e12e8b

File tree

7 files changed

+19
-13
lines changed

7 files changed

+19
-13
lines changed

build/code_sniffer/phpbb/Sniffs/Commenting/FileCommentSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
*
1212
*/
1313

14+
namespace phpbb\Sniffs\Commenting;
15+
1416
use PHP_CodeSniffer\Files\File;
1517
use PHP_CodeSniffer\Sniffs\Sniff;
1618

@@ -21,7 +23,7 @@
2123
* @package code_sniffer
2224
* @author Manuel Pichler <mapi@phpundercontrol.org>
2325
*/
24-
class phpbb_Sniffs_Commenting_FileCommentSniff implements Sniff
26+
class FileCommentSniff implements Sniff
2527
{
2628
/**
2729
* Returns an array of tokens this test wants to listen for.

build/code_sniffer/phpbb/Sniffs/ControlStructures/OpeningBraceBsdAllmanSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
*
1212
*/
1313

14+
namespace phpbb\Sniffs\ControlStructures;
15+
1416
use PHP_CodeSniffer\Files\File;
1517
use PHP_CodeSniffer\Sniffs\Sniff;
1618

1719
/**
1820
* Checks that the opening brace of a control structures is on the line after.
1921
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
2022
*/
21-
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements Sniff
23+
class OpeningBraceBsdAllmanSniff implements Sniff
2224
{
2325
/**
2426
* Registers the tokens that this sniff wants to listen for.

build/code_sniffer/phpbb/Sniffs/ControlStructures/OpeningParenthesisSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* the docs/CREDITS.txt file.
1111
*
1212
*/
13+
namespace phpbb\Sniffs\ControlStructures;
1314

1415
use PHP_CodeSniffer\Files\File;
1516
use PHP_CodeSniffer\Sniffs\Sniff;
@@ -18,7 +19,7 @@
1819
* Checks that there is exactly one space between the keyword and the opening
1920
* parenthesis of a control structures.
2021
*/
21-
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements Sniff
22+
class OpeningParenthesisSniff implements Sniff
2223
{
2324
/**
2425
* Registers the tokens that this sniff wants to listen for.

build/code_sniffer/phpbb/Sniffs/ControlStructures/StaticKeywordSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
*
1212
*/
1313

14+
namespace phpbb\Sniffs\ControlStructures;
15+
1416
use PHP_CodeSniffer\Files\File;
1517
use PHP_CodeSniffer\Sniffs\Sniff;
1618

1719
/**
1820
* Checks that the visibility qualifiers are placed after the static keyword
1921
* according to the coding guidelines
2022
*/
21-
class phpbb_Sniffs_ControlStructures_StaticKeywordSniff implements Sniff
23+
class StaticKeywordSniff implements Sniff
2224
{
2325
/**
2426
* Registers the tokens that this sniff wants to listen for.

build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
*
1212
*/
1313

14+
namespace phpbb\Sniffs\Namespaces;
15+
1416
use PHP_CodeSniffer\Files\File;
1517
use PHP_CodeSniffer\Sniffs\Sniff;
1618

1719
/**
1820
* Checks that each use statement is used.
1921
*/
20-
class phpbb_Sniffs_Namespaces_UnusedUseSniff implements Sniff
22+
class UnusedUseSniff implements Sniff
2123
{
2224
const FIND = [
2325
T_NS_SEPARATOR,

build/code_sniffer/ruleset-php-legacy.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<!-- There MUST not be more than one statement per line. -->
1818
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
1919

20-
<!-- Call-time pass-by-reference MUST not be used. -->
21-
<rule ref="Generic.Functions.CallTimePassByReference.NotAllowed" />
22-
2320
<!-- Filenames MUST be lowercase. -->
2421
<rule ref="Generic.Files.LowercasedFilename" />
2522

phpBB/composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)