private function extractData(object $data): array
    {
        if ($data instanceof \stdClass) {
            return (array) $data;
        }

        $extracted = [];
        $reflection = new \ReflectionObject($data);
        foreach (
            $reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method
        ) {
            if (!$this->isGetMethod($method)) {
                continue;
            }

            $extracted[$this->getAttributeName($method)] = $method->invoke(
                $data
            );
        }

        return $extracted;
    }