File tree Expand file tree Collapse file tree 13 files changed +202
-0
lines changed Expand file tree Collapse file tree 13 files changed +202
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \PHP_CodeSniffer\Standards\Generic\Sniffs\Commenting\DocCommentSniff
9
+ */
10
+ final class IgnoreDocCommentSniffTest extends Base {
11
+
12
+ /**
13
+ * Checks for 'Drupal.Commenting.DocComment.MissingShort'.
14
+ */
15
+ public function testIgnored (): void {
16
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDocCommentSniff.php ' );
17
+ self ::assertNoSniffErrorInFile ($ report );
18
+ }
19
+
20
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \Drupal\Sniffs\Arrays\ArraySniff
9
+ */
10
+ final class IgnoreDrupalArraysArrayLongLineDeclarationTest extends Base {
11
+
12
+ /**
13
+ * Checks for 'Drupal.Arrays.Array.LongLineDeclaration'.
14
+ */
15
+ public function testIgnored (): void {
16
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalArraysArrayLongLineDeclaration.php ' );
17
+ self ::assertNoSniffErrorInFile ($ report );
18
+ }
19
+
20
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \Drupal\Sniffs\Commenting\ClassCommentSniff
9
+ */
10
+ final class IgnoreDrupalCommentingClassCommentShortTest extends Base {
11
+
12
+ /**
13
+ * Checks for 'Drupal.Commenting.ClassComment.Short'.
14
+ */
15
+ public function testIgnored (): void {
16
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalCommentingClassCommentShort.php ' );
17
+ self ::assertNoSniffWarningInFile ($ report );
18
+ }
19
+
20
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentSniff
9
+ */
10
+ final class IgnoreDrupalCommentingFunctionCommentTest extends Base {
11
+
12
+ /**
13
+ * Checks for 'Drupal.Commenting.FunctionComment.IncorrectParamVarName'.
14
+ */
15
+ public function testIgnoredIncorrectParamVarName (): void {
16
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalCommentingFunctionComment_IncorrectParamVarName.php ' );
17
+ self ::assertNoSniffErrorInFile ($ report );
18
+ }
19
+
20
+ /**
21
+ * Checks for 'Drupal.Commenting.FunctionComment.InvalidReturn'.
22
+ */
23
+ public function testIgnoredInvalidReturn (): void {
24
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalCommentingFunctionComment_InvalidReturn.php ' );
25
+ self ::assertNoSniffErrorInFile ($ report );
26
+ }
27
+
28
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \Drupal\Sniffs\Commenting\TodoCommentSniff
9
+ */
10
+ final class IgnoreDrupalCommentingTodoCommentTodoFormatTest extends Base {
11
+
12
+ /**
13
+ * Checks for 'Drupal.Commenting.TodoComment.TodoFormat'.
14
+ */
15
+ public function testIgnored (): void {
16
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalCommentingTodoCommentTodoFormat.php ' );
17
+ self ::assertNoSniffWarningInFile ($ report );
18
+ }
19
+
20
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore ;
6
+
7
+ /**
8
+ * @covers \Drupal\Sniffs\Commenting\VariableCommentSniff
9
+ */
10
+ final class IgnoreDrupalCommentingVariableCommentMissingTest extends Base {
11
+
12
+ public function testIgnored (): void {
13
+ $ report = self ::checkFile (__DIR__ . '/fixtures/IgnoreDrupalCommentingVariableCommentMissing.php ' );
14
+ self ::assertNoSniffErrorInFile ($ report );
15
+ self ::assertNoSniffError ($ report , 12 );
16
+ }
17
+
18
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore \fixtures ;
6
+
7
+ /**
8
+ * Class IgnoreDrupalCommentingClassCommentShort.
9
+ */
10
+ final class IgnoreDocCommentSniff {
11
+
12
+ /**
13
+ * @return $this
14
+ */
15
+ public function foo () {
16
+ return $ this ;
17
+ }
18
+
19
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ $ foo = ['Lorem ipsum dolor sit amet, consectetur adipiscing elit ' , 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ' ];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore \fixtures ;
6
+
7
+ /**
8
+ * Class IgnoreDrupalCommentingClassCommentShort.
9
+ */
10
+ final class IgnoreDrupalCommentingClassCommentShort {
11
+
12
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ /**
6
+ * @param class-string $a
7
+ * Foo.
8
+ */
9
+ function foo (string $ a ): void {
10
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ /**
6
+ * @return class-string
7
+ * Foo.
8
+ */
9
+ function foo (): string {
10
+ return '' ;
11
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ // @TODO: fix this or that.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PreviousNext \CodingStandard \Tests \Ignore \fixtures ;
6
+
7
+ /**
8
+ * The class.
9
+ */
10
+ final class IgnoreDrupalCommentingVariableCommentMissing {
11
+
12
+ public $ foo = NULL ;
13
+
14
+ }
You can’t perform that action at this time.
0 commit comments