Skip to content

Commit faf3631

Browse files
committed
Autofix new psalm issues
1 parent e3058ae commit faf3631

18 files changed

+26
-9
lines changed

MO4/Library/PregLibrary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use PHP_CodeSniffer\Exceptions\RuntimeException;
1818

19-
class PregLibrary
19+
final class PregLibrary
2020
{
2121
/**
2222
* Split string by a regular expression

MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class ArrayDoubleArrowAlignmentSniff implements Sniff
5353
*
5454
* @see Tokens.php
5555
*/
56+
#[\Override]
5657
public function register(): array
5758
{
5859
return $this->arrayTokens;
@@ -69,6 +70,7 @@ public function register(): array
6970
*
7071
* @return void
7172
*/
73+
#[\Override]
7274
public function process(File $phpcsFile, $stackPtr): void
7375
{
7476
$tokens = $phpcsFile->getTokens();

MO4/Sniffs/Arrays/MultiLineArraySniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class MultiLineArraySniff implements Sniff
5050
*
5151
* @see Tokens.php
5252
*/
53+
#[\Override]
5354
public function register(): array
5455
{
5556
return $this->arrayTokens;
@@ -66,6 +67,7 @@ public function register(): array
6667
*
6768
* @return void
6869
*/
70+
#[\Override]
6971
public function process(File $phpcsFile, $stackPtr): void
7072
{
7173
$tokens = $phpcsFile->getTokens();

MO4/Sniffs/Commenting/PropertyCommentSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function __construct()
7777
*
7878
* @throws RuntimeException
7979
*/
80+
#[\Override]
8081
protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope): void
8182
{
8283
$find = [
@@ -245,6 +246,7 @@ protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScop
245246
*
246247
* @return void
247248
*/
249+
#[\Override]
248250
protected function processTokenOutsideScope(File $phpcsFile, $stackPtr): void
249251
{
250252
}

MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class AlphabeticalUseStatementsSniff extends UseDeclarationSniff
8989
*
9090
* @return void
9191
*/
92+
#[\Override]
9293
public function process(File $phpcsFile, $stackPtr): void
9394
{
9495
if (!\in_array($this->order, self::SUPPORTED_ORDERING_METHODS, true)) {

MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class UnnecessaryNamespaceUsageSniff implements Sniff
5656
*
5757
* @see Tokens.php
5858
*/
59+
#[\Override]
5960
public function register(): array
6061
{
6162
return [T_CLASS];
@@ -77,6 +78,7 @@ public function register(): array
7778
*
7879
* @throws RuntimeException
7980
*/
81+
#[\Override]
8082
public function process(File $phpcsFile, $stackPtr): void
8183
{
8284
$docCommentTags = [

MO4/Sniffs/Strings/VariableInDoubleQuotedStringSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class VariableInDoubleQuotedStringSniff implements Sniff
4141
*
4242
* @see Tokens.php
4343
*/
44+
#[\Override]
4445
public function register(): array
4546
{
4647
return [T_DOUBLE_QUOTED_STRING];
@@ -60,6 +61,7 @@ public function register(): array
6061
*
6162
* @return void
6263
*/
64+
#[\Override]
6365
public function process(File $phpcsFile, $stackPtr): void
6466
{
6567
$varRegExp = '/\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/';

MO4/Sniffs/WhiteSpace/ConstantSpacingSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class ConstantSpacingSniff implements Sniff
4848
*
4949
* @see Tokens.php
5050
*/
51+
#[\Override]
5152
public function register(): array
5253
{
5354
return $this->arrayTokens;
@@ -64,6 +65,7 @@ public function register(): array
6465
*
6566
* @return void
6667
*/
68+
#[\Override]
6769
public function process(File $phpcsFile, $stackPtr): void
6870
{
6971
$tokens = $phpcsFile->getTokens();

MO4/Sniffs/WhiteSpace/MultipleEmptyLinesSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class MultipleEmptyLinesSniff implements Sniff
2525
*
2626
* @see Tokens.php
2727
*/
28+
#[\Override]
2829
public function register(): array
2930
{
3031
return [
@@ -44,6 +45,7 @@ public function register(): array
4445
*
4546
* @return void|int
4647
*/
48+
#[\Override]
4749
public function process(File $phpcsFile, $stackPtr)
4850
{
4951
$tokens = $phpcsFile->getTokens();

MO4/Tests/AbstractMo4SniffUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ abstract class AbstractMo4SniffUnitTest extends AbstractSniffUnitTest
6868
*
6969
* @throws RuntimeException
7070
*/
71+
#[\Override]
7172
protected function getErrorList(string $testFile = ''): array
7273
{
7374
return $this->getRecordForTestFile($testFile, $this->expectedErrorList);
@@ -85,6 +86,7 @@ protected function getErrorList(string $testFile = ''): array
8586
*
8687
* @throws RuntimeException
8788
*/
89+
#[\Override]
8890
protected function getWarningList(string $testFile = ''): array
8991
{
9092
return $this->getRecordForTestFile($testFile, $this->expectedWarningList);

0 commit comments

Comments
 (0)