Code Duplication    Length = 10-10 lines in 2 locations

src/ChangeStream/ResourceStack.php 2 locations

@@ 60-69 (lines=10) @@
57
     *
58
     * @return int
59
     */
60
    public function getCurrentVersion()
61
    {
62
        $versions = $this->getVersions();
63
64
        if (0 === count($versions)) {
65
            throw new RuntimeException('Could not retrieve the current version of an empty stack.');
66
        }
67
68
        return end($versions);
69
    }
70
71
    /**
72
     * Get the current version resource.
@@ 86-95 (lines=10) @@
83
     *
84
     * @return int
85
     */
86
    public function getFirstVersion()
87
    {
88
        $versions = $this->getVersions();
89
90
        if (0 === count($versions)) {
91
            throw new RuntimeException('Could not retrieve the first version of an empty stack.');
92
        }
93
94
        return reset($versions);
95
    }
96
97
    /**
98
     * Get a specific version resource from the stack by its version number.