diff --git a/src/DetectChanges/BCBreak/PropertyBased/PropertyTypeChanged.php b/src/DetectChanges/BCBreak/PropertyBased/PropertyTypeChanged.php index 627b4c04..99025f93 100644 --- a/src/DetectChanges/BCBreak/PropertyBased/PropertyTypeChanged.php +++ b/src/DetectChanges/BCBreak/PropertyBased/PropertyTypeChanged.php @@ -45,7 +45,7 @@ public function __invoke(ReflectionProperty $fromProperty, ReflectionProperty $t return Changes::fromList(Change::changed( Str\format( - 'Type type of property %s changed from %s to %s', + 'Type of property %s changed from %s to %s', ($this->formatProperty)($fromProperty), $fromType?->__toString() ?? 'having no type', $toType?->__toString() ?? 'having no type', diff --git a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php index fad2fa8c..416a3b88 100644 --- a/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php +++ b/test/unit/DetectChanges/BCBreak/PropertyBased/PropertyTypeChangedTest.php @@ -232,9 +232,9 @@ class TheClass { 'duplicatePropertyTypesBeingDeduplicatedAreNotBcBreaks' => [], 'propertyTypeBeingDuplicatedAreNotBcBreaks' => [], 'propertyWithComplexDocblockThatCannotBeParsed' => [], - 'propertyWithDocblockTypeHintChangeToNativeTypeHint' => ['[BC] CHANGED: Type type of property TheClass#$propertyWithDocblockTypeHintChangeToNativeTypeHint changed from having no type to int'], - 'propertyWithDocblockTypeHintChangeToNativeTypeHintAndTypeChange' => ['[BC] CHANGED: Type type of property TheClass#$propertyWithDocblockTypeHintChangeToNativeTypeHintAndTypeChange changed from having no type to float'], - 'propertyWithDeclaredTypeRemoved' => ['[BC] CHANGED: Type type of property TheClass#$propertyWithDeclaredTypeRemoved changed from int to having no type'], + 'propertyWithDocblockTypeHintChangeToNativeTypeHint' => ['[BC] CHANGED: Type of property TheClass#$propertyWithDocblockTypeHintChangeToNativeTypeHint changed from having no type to int'], + 'propertyWithDocblockTypeHintChangeToNativeTypeHintAndTypeChange' => ['[BC] CHANGED: Type of property TheClass#$propertyWithDocblockTypeHintChangeToNativeTypeHintAndTypeChange changed from having no type to float'], + 'propertyWithDeclaredTypeRemoved' => ['[BC] CHANGED: Type of property TheClass#$propertyWithDeclaredTypeRemoved changed from int to having no type'], ]; return array_combine(