Code Duplication    Length = 8-10 lines in 2 locations

src/Serialize/TypeResolver/SerializerTypeDefinitionMap.php 2 locations

@@ 58-65 (lines=8) @@
55
     *
56
     * @return \stdClass
57
     */
58
    public function getDefinitionByType(string $type): \stdClass
59
    {
60
        if (!isset($this->definitions[$type])) {
61
            throw new \InvalidArgumentException("Type '$type' not in definition map");
62
        }
63
64
        return $this->definitions[$type];
65
    }
66
67
    /**
68
     * @param string $fqdn
@@ 72-81 (lines=10) @@
69
     *
70
     * @return \stdClass
71
     */
72
    public function getDefinitionByFqcn(string $fqdn): \stdClass
73
    {
74
        $type = $this->getType($fqdn);
75
76
        if (!isset($this->definitions[$type])) {
77
            throw new \InvalidArgumentException("Type '$type' not in definition map");
78
        }
79
80
        return $this->definitions[$type];
81
    }
82
83
    /**
84
     * @param string $type