Code Duplication    Length = 5-5 lines in 2 locations

src/library/ThreemaGateway/Handler/Action/GatewayServer.php 2 locations

@@ 121-125 (lines=5) @@
118
        /** @var Threema\MsgApi\Commands\Results\CreditsResult $result */
119
        $result = $this->getConnector()->credits();
120
121
        if ($result->isSuccess()) {
122
            return $result->getCredits();
123
        } else {
124
            throw new XenForo_Exception(new XenForo_Phrase('threemagw_getting_credits_failed') . ' ' . $result->getErrorMessage());
125
        }
126
    }
127
128
    /**
@@ 150-154 (lines=5) @@
147
148
        /** @var Threema\MsgApi\Commands\Results\FetchPublicKeyResult $result */
149
        $result = $this->getConnector()->fetchPublicKey($threemaId);
150
        if ($result->isSuccess()) {
151
            return $result->getPublicKey();
152
        } else {
153
            throw new XenForo_Exception(new XenForo_Phrase('threemagw_fetching_publickey_failed') . ' ' . $result->getErrorMessage());
154
        }
155
    }
156
}
157