Code Duplication    Length = 10-10 lines in 2 locations

src/Api.php 2 locations

@@ 154-163 (lines=10) @@
151
     *
152
     * @throws \Github\Exception\InvalidArgumentException
153
     */
154
    final public function getLastUpdatedTimestamp($path)
155
    {
156
        $commits = $this->commitsForFile($path);
157
158
        $updated = array_shift($commits);
159
160
        $time = new \DateTime($updated['commit']['committer']['date']);
161
162
        return ['timestamp' => $time->getTimestamp()];
163
    }
164
165
    /**
166
     * @param string $path
@@ 172-181 (lines=10) @@
169
     *
170
     * @throws \Github\Exception\InvalidArgumentException
171
     */
172
    final public function getCreatedTimestamp($path)
173
    {
174
        $commits = $this->commitsForFile($path);
175
176
        $created = array_pop($commits);
177
178
        $time = new \DateTime($created['commit']['committer']['date']);
179
180
        return ['timestamp' => $time->getTimestamp()];
181
    }
182
183
    /**
184
     * @param string $path