@@ -53,6 +53,9 @@ public function testGetPrettyString()
5353 $ this ->assertSame ($ expectedVersion , $ result );
5454 }
5555
56+ /**
57+ * @return array<mixed>
58+ */
5659 public static function successfulVersionMatches ()
5760 {
5861 return array (
@@ -161,6 +164,10 @@ public static function successfulVersionMatches()
161164
162165 /**
163166 * @dataProvider successfulVersionMatches
167+ * @param Constraint::STR_OP_* $requireOperator
168+ * @param string $requireVersion
169+ * @param Constraint::STR_OP_* $provideOperator
170+ * @param string $provideVersion
164171 */
165172 public function testVersionMatchSucceeds ($ requireOperator , $ requireVersion , $ provideOperator , $ provideVersion )
166173 {
@@ -178,6 +185,9 @@ public function testVersionMatchSucceeds($requireOperator, $requireVersion, $pro
178185 $ this ->assertTrue (Intervals::compactConstraint ($ versionProvide )->matches (Intervals::compactConstraint ($ versionRequire )));
179186 }
180187
188+ /**
189+ * @return array<mixed>
190+ */
181191 public static function failingVersionMatches ()
182192 {
183193 return array (
@@ -331,6 +341,10 @@ public static function failingVersionMatches()
331341
332342 /**
333343 * @dataProvider failingVersionMatches
344+ * @param Constraint::STR_OP_* $requireOperator
345+ * @param string $requireVersion
346+ * @param Constraint::STR_OP_* $provideOperator
347+ * @param string $provideVersion
334348 */
335349 public function testVersionMatchFails ($ requireOperator , $ requireVersion , $ provideOperator , $ provideVersion )
336350 {
@@ -411,19 +425,18 @@ public function testComparableBranches()
411425 * @dataProvider invalidOperators
412426 *
413427 * @param string $version
414- * @param string $operator
415- * @param string $expected
428+ * @param Constraint::STR_OP_* $operator
429+ * @param class- string $expected
416430 */
417431 public function testInvalidOperators ($ version , $ operator , $ expected )
418432 {
419433 $ this ->doExpectException ($ expected );
420434
421- /** @phpstan-ignore-next-line */
422435 new Constraint ($ operator , $ version );
423436 }
424437
425438 /**
426- * @return array
439+ * @return array<mixed>
427440 */
428441 public function invalidOperators ()
429442 {
@@ -437,12 +450,10 @@ public function invalidOperators()
437450 /**
438451 * @dataProvider bounds
439452 *
440- * @param string $operator
453+ * @param Constraint::STR_OP_* $operator
441454 * @param string $normalizedVersion
442455 * @param Bound $expectedLower
443456 * @param Bound $expectedUpper
444- *
445- * @phpstan-param Constraint::STR_OP_* $operator
446457 */
447458 public function testBounds ($ operator , $ normalizedVersion , Bound $ expectedLower , Bound $ expectedUpper )
448459 {
@@ -453,7 +464,7 @@ public function testBounds($operator, $normalizedVersion, Bound $expectedLower,
453464 }
454465
455466 /**
456- * @return array
467+ * @return array<mixed>
457468 */
458469 public function bounds ()
459470 {
@@ -496,6 +507,10 @@ public function bounds()
496507
497508 /**
498509 * @dataProvider matrix
510+ * @param Constraint::STR_OP_* $requireOperator
511+ * @param string $requireVersion
512+ * @param Constraint::STR_OP_* $provideOperator
513+ * @param string $provideVersion
499514 */
500515 public function testCompile ($ requireOperator , $ requireVersion , $ provideOperator , $ provideVersion )
501516 {
@@ -517,6 +532,9 @@ public function testCompile($requireOperator, $requireVersion, $provideOperator,
517532 $ this ->assertSame ($ m , Intervals::haveIntersections ($ require , $ provide ));
518533 }
519534
535+ /**
536+ * @return array<mixed>
537+ */
520538 public function matrix ()
521539 {
522540 $ versions = array ('1.0 ' , '2.0 ' , 'dev-master ' , 'dev-foo ' , '3.0-b2 ' , '3.0-beta2 ' );
@@ -536,6 +554,11 @@ public function matrix()
536554 return $ matrix ;
537555 }
538556
557+ /**
558+ * @param Constraint::STR_OP_* $operator
559+ * @param string $version
560+ * @return bool
561+ */
539562 private function matchCompiled (ConstraintInterface $ constraint , $ operator , $ version )
540563 {
541564 $ map = array (
@@ -556,6 +579,10 @@ private function matchCompiled(ConstraintInterface $constraint, $operator, $vers
556579 return eval ("return $ code; " );
557580 }
558581
582+ /**
583+ * @param class-string $class
584+ * @return void
585+ */
559586 private function doExpectException ($ class )
560587 {
561588 if (method_exists ($ this , 'expectException ' )) {
0 commit comments