@@ -28,19 +28,16 @@ class DataProviderHelper
2828 /**
2929 * Reflection provider.
3030 *
31- * @var ReflectionProvider
3231 */
33- private $ reflectionProvider ;
32+ private ReflectionProvider $ reflectionProvider ;
3433
3534 /**
3635 * The file type mapper.
3736 *
38- * @var FileTypeMapper
3937 */
40- private $ fileTypeMapper ;
38+ private FileTypeMapper $ fileTypeMapper ;
4139
42- /** @var bool */
43- private $ phpunit10OrNewer ;
40+ private bool $ phpunit10OrNewer ;
4441
4542 public function __construct (
4643 ReflectionProvider $ reflectionProvider ,
@@ -69,7 +66,7 @@ public function getDataProviderMethods(
6966 $ classReflection ->getName (),
7067 $ scope ->isInTrait () ? $ scope ->getTraitReflection ()->getName () : null ,
7168 $ node ->name ->toString (),
72- $ docComment ->getText ()
69+ $ docComment ->getText (),
7370 );
7471 foreach ($ this ->getDataProviderAnnotations ($ methodPhpDoc ) as $ annotation ) {
7572 $ dataProviderValue = $ this ->getDataProviderAnnotationValue ($ annotation );
@@ -122,7 +119,7 @@ private function getDataProviderAnnotations(?ResolvedPhpDocBlock $phpDoc): array
122119 foreach ($ phpDocNodes as $ docNode ) {
123120 $ annotations = array_merge (
124121 $ annotations ,
125- $ docNode ->getTagsByName ('@dataProvider ' )
122+ $ docNode ->getTagsByName ('@dataProvider ' ),
126123 );
127124 }
128125
@@ -145,7 +142,7 @@ public function processDataProvider(
145142 return [
146143 RuleErrorBuilder::message (sprintf (
147144 '@dataProvider %s related class not found. ' ,
148- $ dataProviderValue
145+ $ dataProviderValue,
149146 ))
150147 ->line ($ lineNumber )
151148 ->identifier ('phpunit.dataProviderClass ' )
@@ -159,7 +156,7 @@ public function processDataProvider(
159156 return [
160157 RuleErrorBuilder::message (sprintf (
161158 '@dataProvider %s related method not found. ' ,
162- $ dataProviderValue
159+ $ dataProviderValue,
163160 ))
164161 ->line ($ lineNumber )
165162 ->identifier ('phpunit.dataProviderMethod ' )
@@ -173,7 +170,7 @@ public function processDataProvider(
173170 $ errors [] = RuleErrorBuilder::message (sprintf (
174171 '@dataProvider %s related method is used with incorrect case: %s. ' ,
175172 $ dataProviderValue ,
176- $ dataProviderMethodReflection ->getName ()
173+ $ dataProviderMethodReflection ->getName (),
177174 ))
178175 ->line ($ lineNumber )
179176 ->identifier ('method.nameCase ' )
@@ -183,7 +180,7 @@ public function processDataProvider(
183180 if (!$ dataProviderMethodReflection ->isPublic ()) {
184181 $ errors [] = RuleErrorBuilder::message (sprintf (
185182 '@dataProvider %s related method must be public. ' ,
186- $ dataProviderValue
183+ $ dataProviderValue,
187184 ))
188185 ->line ($ lineNumber )
189186 ->identifier ('phpunit.dataProviderPublic ' )
@@ -193,7 +190,7 @@ public function processDataProvider(
193190 if ($ deprecationRulesInstalled && $ this ->phpunit10OrNewer && !$ dataProviderMethodReflection ->isStatic ()) {
194191 $ errors [] = RuleErrorBuilder::message (sprintf (
195192 '@dataProvider %s related method must be static in PHPUnit 10 and newer. ' ,
196- $ dataProviderValue
193+ $ dataProviderValue,
197194 ))
198195 ->line ($ lineNumber )
199196 ->identifier ('phpunit.dataProviderStatic ' )
0 commit comments