Skip to content

Commit cd02bf3

Browse files
authored
Merge pull request magento#141 from magento-commerce/imported-sergeynezbritskiy-magento-coding-standard-346
[Imported] Fix Issue 340
2 parents 6f2a73b + 816605b commit cd02bf3

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Magento2/Sniffs/Commenting/ClassPropertyPHPDocFormattingSniff.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class ClassPropertyPHPDocFormattingSniff extends AbstractVariableSniff
2828
T_WHITESPACE,
2929
T_NS_SEPARATOR,
3030
T_STRING,
31-
T_COMMENT
31+
T_COMMENT,
32+
T_NULLABLE
3233
];
3334

3435
/**

Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.inc

+8-1
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,12 @@ class correctlyFormattedClassMemberDocBlock
134134
/**
135135
* @var string
136136
*/
137-
protected string $test;
137+
protected string $test1;
138+
139+
/**
140+
* Ensure that nullable sign in the property type hint declaration is interpreted correctly
141+
*
142+
* @var string|null
143+
*/
144+
protected ?string $test2;
138145
}

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
</testsuite>
1010
</testsuites>
1111
<php>
12-
<env name="PHPCS_IGNORE_TESTS" value="Generic,MySource,PEAR,PSR1,PSR2,Squiz,Zend"/>
12+
<env name="PHPCS_IGNORE_TESTS" value="Generic,MySource,PEAR,PSR1,PSR2,PSR12,Squiz,Zend"/>
1313
</php>
1414
</phpunit>

0 commit comments

Comments
 (0)