Code Duplication    Length = 8-13 lines in 2 locations

sources/lib/Client/ClientPoolerTrait.php 1 location

@@ 117-124 (lines=8) @@
114
     * @return Session
115
     * @throws FoundationException
116
     */
117
    protected function getSession()
118
    {
119
        if ($this->session === null) {
120
            throw new FoundationException(sprintf("Client pooler '%s' is not initialized, session not set.", get_class($this)));
121
        }
122
123
        return $this->session;
124
    }
125
}
126

sources/lib/Client/ClientTrait.php 1 location

@@ 56-68 (lines=13) @@
53
     * @throws  FoundationException if Session is not set.
54
     * @return Session
55
     */
56
    protected function getSession()
57
    {
58
        if ($this->session === null) {
59
            throw new FoundationException(
60
                sprintf(
61
                    "Client '%s' is not initialized hence does not have a session.",
62
                    get_class($this)
63
                )
64
            );
65
        }
66
67
        return $this->session;
68
    }
69
}
70