Code Duplication    Length = 19-20 lines in 2 locations

src/Resources/Timeline.php 2 locations

@@ 97-115 (lines=19) @@
94
     *
95
     * @see http://developers.hubspot.com/docs/methods/timeline/create-event-type
96
     */
97
    public function createEventType(
98
        $appId,
99
        $name,
100
        $headerTemplate = null,
101
        $detailTemplate = null,
102
        $objectType = null
103
    ) {
104
        $endpoint = "https://api.hubapi.com/integrations/v1/{$appId}/timeline/event-types";
105
106
        $data['json'] = [
107
            'applicationId'  => $appId,
108
            'name'           => $name,
109
            'headerTemplate' => $headerTemplate,
110
            'detailTemplate' => $detailTemplate,
111
            'objectType'     => $objectType,
112
        ];
113
114
        return $this->client->request('post', $endpoint, $data);
115
    }
116
117
    /**
118
     * Update Timeline Event Type
@@ 131-150 (lines=20) @@
128
     *
129
     * @see http://developers.hubspot.com/docs/methods/timeline/update-event-type
130
     */
131
    public function updateEventType(
132
        $appId,
133
        $eventTypeId,
134
        $name = null,
135
        $headerTemplate = null,
136
        $detailTemplate = null,
137
        $objectType = null
138
    ) {
139
        $endpoint = "https://api.hubapi.com/integrations/v1/{$appId}/timeline/event-types/{$eventTypeId}";
140
141
        $data['json'] = [
142
            'applicationId'  => $appId,
143
            'name'           => $name,
144
            'headerTemplate' => $headerTemplate,
145
            'detailTemplate' => $detailTemplate,
146
            'objectType'     => $objectType,
147
        ];
148
149
        return $this->client->request('put', $endpoint, $data);
150
    }
151
152
    /**
153
     * Delete Timeline Event Type