@@ -65,9 +65,9 @@ private function processSingleConstant(ClassReflection $classReflection, string
6565 if ($ prototype ->isFinal ()) {
6666 $ errors [] = RuleErrorBuilder::message (sprintf (
6767 'Constant %s::%s overrides final constant %s::%s. ' ,
68- $ classReflection ->getDisplayName (),
68+ $ classReflection ->getDisplayName (false ),
6969 $ constantReflection ->getName (),
70- $ prototype ->getDeclaringClass ()->getDisplayName (),
70+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
7171 $ prototype ->getName (),
7272 ))->identifier ('classConstant.final ' )->nonIgnorable ()->build ();
7373 }
@@ -77,18 +77,18 @@ private function processSingleConstant(ClassReflection $classReflection, string
7777 $ errors [] = RuleErrorBuilder::message (sprintf (
7878 '%s constant %s::%s overriding public constant %s::%s should also be public. ' ,
7979 $ constantReflection ->isPrivate () ? 'Private ' : 'Protected ' ,
80- $ constantReflection ->getDeclaringClass ()->getDisplayName (),
80+ $ constantReflection ->getDeclaringClass ()->getDisplayName (false ),
8181 $ constantReflection ->getName (),
82- $ prototype ->getDeclaringClass ()->getDisplayName (),
82+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
8383 $ prototype ->getName (),
8484 ))->identifier ('classConstant.visibility ' )->nonIgnorable ()->build ();
8585 }
8686 } elseif ($ constantReflection ->isPrivate ()) {
8787 $ errors [] = RuleErrorBuilder::message (sprintf (
8888 'Private constant %s::%s overriding protected constant %s::%s should be protected or public. ' ,
89- $ constantReflection ->getDeclaringClass ()->getDisplayName (),
89+ $ constantReflection ->getDeclaringClass ()->getDisplayName (false ),
9090 $ constantReflection ->getName (),
91- $ prototype ->getDeclaringClass ()->getDisplayName (),
91+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
9292 $ prototype ->getName (),
9393 ))->identifier ('classConstant.visibility ' )->nonIgnorable ()->build ();
9494 }
@@ -105,19 +105,19 @@ private function processSingleConstant(ClassReflection $classReflection, string
105105 $ errors [] = RuleErrorBuilder::message (sprintf (
106106 'Native type %s of constant %s::%s is not covariant with native type %s of constant %s::%s. ' ,
107107 $ constantNativeType ->describe (VerbosityLevel::typeOnly ()),
108- $ constantReflection ->getDeclaringClass ()->getDisplayName (),
108+ $ constantReflection ->getDeclaringClass ()->getDisplayName (false ),
109109 $ constantReflection ->getName (),
110110 $ prototypeNativeType ->describe (VerbosityLevel::typeOnly ()),
111- $ prototype ->getDeclaringClass ()->getDisplayName (),
111+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
112112 $ prototype ->getName (),
113113 ))->identifier ('classConstant.nativeType ' )->nonIgnorable ()->build ();
114114 }
115115 } else {
116116 $ errors [] = RuleErrorBuilder::message (sprintf (
117117 'Constant %s::%s overriding constant %s::%s (%s) should also have native type %s. ' ,
118- $ constantReflection ->getDeclaringClass ()->getDisplayName (),
118+ $ constantReflection ->getDeclaringClass ()->getDisplayName (false ),
119119 $ constantReflection ->getName (),
120- $ prototype ->getDeclaringClass ()->getDisplayName (),
120+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
121121 $ prototype ->getName (),
122122 $ prototypeNativeType ->describe (VerbosityLevel::typeOnly ()),
123123 $ prototypeNativeType ->describe (VerbosityLevel::typeOnly ()),
@@ -137,10 +137,10 @@ private function processSingleConstant(ClassReflection $classReflection, string
137137 $ errors [] = RuleErrorBuilder::message (sprintf (
138138 'Type %s of constant %s::%s is not covariant with type %s of constant %s::%s. ' ,
139139 $ constantReflection ->getValueType ()->describe (VerbosityLevel::value ()),
140- $ constantReflection ->getDeclaringClass ()->getDisplayName (),
140+ $ constantReflection ->getDeclaringClass ()->getDisplayName (false ),
141141 $ constantReflection ->getName (),
142142 $ prototype ->getValueType ()->describe (VerbosityLevel::value ()),
143- $ prototype ->getDeclaringClass ()->getDisplayName (),
143+ $ prototype ->getDeclaringClass ()->getDisplayName (false ),
144144 $ prototype ->getName (),
145145 ))->identifier ('classConstant.type ' )->build ();
146146 }
0 commit comments