Skip to content

Commit 1aab42a

Browse files
committed
test: Add inspections for null pointer and void function usage
- Introduce new static analysis inspections for null pointers and void function results in multiple test files. - Update existing annotations to improve code quality and catch potential issues early. - Ensure all relevant tests are annotated consistently.
1 parent 987ccf7 commit 1aab42a

21 files changed

+73
-7
lines changed

_ide_helper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22

3-
/** @noinspection EmptyClassInspection */
43
/** @noinspection ClassNameCollisionInspection */
4+
/** @noinspection EmptyClassInspection */
5+
/** @noinspection PhpMultipleClassDeclarationsInspection */
56

67
declare(strict_types=1);
78

monorepo-builder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
/** @noinspection PhpUnusedAliasInspection */
4+
35
declare(strict_types=1);
46

57
/**

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
/** @noinspection PhpInternalEntityUsedInspection */
44
/** @noinspection PhpUnhandledExceptionInspection */
5+
/** @noinspection PhpUnusedAliasInspection */
6+
57
declare(strict_types=1);
68

79
/**

tests/Channels/AbstractChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

tests/Channels/ChannelTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4-
/** @noinspection DebugFunctionUsageInspection */
5-
/** @noinspection ForgottenDebugOutputInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
68
/** @noinspection StaticClosureCanBeUsedInspection */
79

810
declare(strict_types=1);

tests/Channels/DumpChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

tests/Channels/LogChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

tests/Channels/MailChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

tests/Channels/NotifyChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

tests/Channels/StackChannelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

33
/** @noinspection AnonymousFunctionStaticInspection */
4+
/** @noinspection NullPointerExceptionInspection */
5+
/** @noinspection PhpInternalEntityUsedInspection */
6+
/** @noinspection PhpUnhandledExceptionInspection */
7+
/** @noinspection PhpVoidFunctionResultUsedInspection */
48
/** @noinspection StaticClosureCanBeUsedInspection */
59

610
declare(strict_types=1);

0 commit comments

Comments
 (0)