Code Duplication    Length = 12-12 lines in 2 locations

src/Driver/ServerGoneAwayExceptionsAwareTrait.php 2 locations

@@ 37-48 (lines=12) @@
34
     *
35
     * @return bool
36
     */
37
    public function isGoneAwayException(Throwable $exception): bool
38
    {
39
        $message = $exception->getMessage();
40
41
        foreach ($this->goneAwayExceptions as $goneAwayException) {
42
            if (stripos($message, $goneAwayException) !== false) {
43
                return true;
44
            }
45
        }
46
47
        return false;
48
    }
49
50
    /**
51
     * @param Throwable $exception
@@ 55-66 (lines=12) @@
52
     *
53
     * @return bool
54
     */
55
    public function isGoneAwayInUpdateException(Throwable $exception): bool
56
    {
57
        $message = $exception->getMessage();
58
59
        foreach ($this->goneAwayInUpdateExceptions as $goneAwayException) {
60
            if (stripos($message, $goneAwayException) !== false) {
61
                return true;
62
            }
63
        }
64
65
        return false;
66
    }
67
}
68