Code Duplication    Length = 7-7 lines in 2 locations

src/ParameterType.php 1 location

@@ 75-81 (lines=7) @@
72
        $typeName = null;
73
        $typeReflection = $reflection->getType();
74
75
        if ($typeReflection !== null) {
76
            $typeName = (string)$typeReflection;
77
78
            if ($typeReflection->allowsNull()) {
79
                $flags |= self::NULLABLE;
80
            }
81
        }
82
83
        return new self($parameterName, $typeName, $flags);
84
    }

src/ReturnType.php 1 location

@@ 32-38 (lines=7) @@
29
        $typeName = null;
30
        $typeReflection = $reflection->getReturnType();
31
32
        if ($typeReflection !== null) {
33
            $typeName = (string)$typeReflection;
34
35
            if ($typeReflection->allowsNull()) {
36
                $flags |= self::NULLABLE;
37
            }
38
        }
39
40
        return new self($typeName, $flags);
41
    }