File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed
Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -510,23 +510,18 @@ public function testBug659(?string $objectManagerLoader): void
510510
511511 $ dbalVersion = InstalledVersions::getVersion ('doctrine/dbal ' );
512512 $ hasDbal4 = $ dbalVersion !== null && strpos ($ dbalVersion , '4. ' ) === 0 ;
513- if ($ hasDbal4 ) {
514- $ errors = [
515- [
516- 'Property PHPStan\Rules\Doctrine\ORM\MyEntity659::$binaryResource type mapping mismatch: database can contain string but property expects resource. ' ,
517- 31 ,
518- ],
519- ];
520- } else {
521- $ errors = [
522- [
523- 'Property PHPStan\Rules\Doctrine\ORM\MyEntity659::$binaryString type mapping mismatch: database can contain resource but property expects string. ' ,
524- 25 ,
525- ],
526- ];
527- }
528513
529- $ this ->analyse ([__DIR__ . '/data/bug-659.php ' ], $ errors );
514+ $ this ->analyse ([__DIR__ . '/data/bug-659.php ' ], [
515+ [
516+ sprintf (
517+ 'Property PHPStan\Rules\Doctrine\ORM\MyEntity659::%s type mapping mismatch: database can contain %s but property expects %s. ' ,
518+ $ hasDbal4 ? '$binaryResource ' : '$binaryString ' ,
519+ $ hasDbal4 ? 'string ' : 'resource ' ,
520+ $ hasDbal4 ? 'resource ' : 'string ' ,
521+ ),
522+ $ hasDbal4 ? 31 : 25 ,
523+ ],
524+ ]);
530525 }
531526
532527}
You can’t perform that action at this time.
0 commit comments