@@ -39,7 +39,7 @@ class TokenParser
3939 /**
4040 * @var string
4141 */
42- private $ className ;
42+ private string $ className ;
4343
4444 /**
4545 * @var string
@@ -143,6 +143,7 @@ public function getNamespace(): string
143143 *
144144 * @return array<string|int,mixed> A list with all found use statements.
145145 * @codeCoverageIgnore
146+ * @infection-ignore-all
146147 */
147148 public function parseUseStatements ($ namespaceName )
148149 {
@@ -196,12 +197,15 @@ public function getProperties(string $classPath): array
196197 * @throws \RuntimeException
197198 * @return string|null Type of the property (content of var annotation)
198199 * @codeCoverageIgnore
200+ * @infection-ignore-all
199201 */
200202 public function getPropertyClass (ReflectionProperty $ property , bool $ ignorePrimitive = true )
201203 {
202204 $ type = null ;
203- $ phpVersion = false === phpversion () ? '7.0.0 ' : phpversion ();
204- // Get is explicit type decralation if possible
205+ /** @var false|string $phpVersionResult */
206+ $ phpVersionResult = phpversion ();
207+ $ phpVersion = false === $ phpVersionResult ? '7.0.0 ' : $ phpVersionResult ;
208+ // Get is explicit type declaration if possible
205209 if (version_compare ($ phpVersion , '7.4.0 ' , '>= ' ) && null !== $ property ->getType ()) {
206210 $ reflectionType = $ property ->getType ();
207211
@@ -281,6 +285,7 @@ public function getPropertyClass(ReflectionProperty $property, bool $ignorePrimi
281285 *
282286 * @return string|null Fully qualified name of the type, or null if it could not be resolved
283287 * @codeCoverageIgnore
288+ * @infection-ignore-all
284289 */
285290 private function tryResolveFqn ($ type , ReflectionClass $ class , Reflector $ member )
286291 {
@@ -324,6 +329,7 @@ private function tryResolveFqn($type, ReflectionClass $class, Reflector $member)
324329 *
325330 * @return string|null Fully qualified name of the type, or null if it could not be resolved
326331 * @codeCoverageIgnore
332+ * @infection-ignore-all
327333 */
328334 private function tryResolveFqnInTraits ($ type , ReflectionClass $ class , Reflector $ member )
329335 {
@@ -389,6 +395,7 @@ private function next($docCommentIsComment = true)
389395 *
390396 * @return array<string,class-string> A list with all found class names for a use statement.
391397 * @codeCoverageIgnore
398+ * @infection-ignore-all
392399 */
393400 private function parseUseStatement ()
394401 {
0 commit comments