Code Duplication    Length = 10-10 lines in 2 locations

src/Api.php 2 locations

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