Classes

Coverage Distribution

Complexity

Methods

Coverage Distribution

Complexity

Insufficient Coverage

Method Coverage
__construct0%
getDatabase0%
getStore0%
getAblyService0%
createEventService0%
createCouponService0%
createRedemptionService0%
createEventServiceStatic0%
createCouponServiceStatic0%
createRedemptionServiceStatic0%
createAblyServiceStatic0%
setDatabase0%
setStore0%
setAblyService0%
setSmsQueue0%
getTypeNum0%
getEventStatistics0%
__construct0%
checkAuth0%
getEvents0%
createEvent0%
updateEvent0%
deleteEvent0%
lookupCoupon0%
redeemCoupon0%
getEventReport0%
getEventStatistics0%
setJsonContentType0%
sendJsonResponse0%
sendErrorResponse0%
getJsonRequestBody0%
validateRedemptionRequest0%
mapRedemptionErrorToHttpStatus0%
main0%
__construct0%
getSettings0%
issueCoupon0%
validateCoupon0%
redeemCoupon0%
validateApiKey0%
sendUnauthorizedResponse0%
setJsonContentType0%
sendJsonResponse0%
sendErrorResponse0%
getJsonRequestBody0%
formatSideSettings0%
generateSettingsVersion0%
formatCouponForResponse0%
formatDateTime0%
sanitizePhone0%
validateIssueCouponRequest0%
validateRedemptionRequest0%
mapErrorCodeToHttpStatus0%
mapRedemptionErrorToHttpStatus0%
fromRow0%
generateCode0%
getId0%
getEventId0%
getCode0%
getValue0%
getOriginalValue0%
getSourceTransactionId0%
getSourceTransactionAmount0%
getCustomerPhone0%
getCustomerName0%
getStatus0%
getExpiresAt0%
getIssuedAt0%
getIssuedByEmployeeId0%
isExpired0%
isRedeemable0%
canRedeemForAmount0%
getDisplayCode0%
markRedeemed0%
markExpired0%
reinstate0%
markVoided0%
toArray0%
setId0%
setEventId0%
setCode0%
setValue0%
setOriginalValue0%
setSourceTransactionId0%
setSourceTransactionAmount0%
setCustomerPhone0%
setCustomerName0%
setStatus0%
setExpiresAt0%
setIssuedAt0%
setIssuedByEmployeeId0%
isActive0%
isInRedemptionPeriod0%
calculateReward0%
calculateTieredReward0%
toSettingsArray0%
toArray0%
fromRow0%
parseDateTime0%
parseJson0%
validate0%
fromRow0%
getCoupon0%
setCoupon0%
toArray0%
wasRedeemedVia0%
__construct0%
setEventService0%
publish0%
broadcastSettingsUpdate0%
broadcastEventStarted0%
broadcastEventEnded0%
getActiveEventSettings0%
isEnabled0%
__construct0%
issueCoupon0%
validateCoupon0%
getCouponByCode0%
findCouponByTransactionId0%
insertCoupon0%
shouldQueueSms0%
normalizeCode0%
formatDisplayCode0%
formatCouponResponse0%
formatCouponFromRow0%
findByCode0%
getMinimumPurchaseForEvent0%
updateCouponStatus0%
__construct0%
createEvent0%
getEvent0%
updateEvent0%
deleteEvent0%
listEvents0%
getActiveEvent0%
getActiveEventBySide0%
getActiveEvents0%
validateDateSequence0%
activateEvent0%
endEvent0%
cancelEvent0%
scheduleEvent0%
hydrateEventFromData0%
mergeEventData0%
validateEventData0%
checkForActiveConflict0%
autoEndEvent0%
parseDateTime0%
camelToSnake0%
formatValueForDb0%
__construct0%
redeemCoupon0%
getRedemptionsByEvent0%
normalizeCode0%
validateCouponStatus0%
insertRedemptionRecord0%
main11%

Project Risks

Method CRAP
validateEventData420
validate306
redeemCoupon156
updateEvent132
validateRedemptionRequest132
validateIssueCouponRequest132
validateRedemptionRequest132
issueCoupon110
createEvent90
redeemCoupon90
redeemCoupon72
mapRedemptionErrorToHttpStatus72
validateCoupon72
mapRedemptionErrorToHttpStatus72
fromRow72
validateCoupon72
activateEvent72
sanitizePhone56
isInRedemptionPeriod56
calculateReward56
calculateTieredReward56
issueCoupon56
hydrateEventFromData56
formatValueForDb56
isActive42
checkAuth30
getEvents30
lookupCoupon30
parseDateTime30
__construct30
createEvent30
updateEvent30
parseDateTime30
validateCouponStatus30
main22
getEventStatistics20
deleteEvent20
getEventReport20
getJsonRequestBody20
main20
getJsonRequestBody20
mapErrorCodeToHttpStatus20
parseJson20
publish20
shouldQueueSms20
listEvents20
validateDateSequence20
cancelEvent20
scheduleEvent20
getRedemptionsByEvent20
getDatabase12
generateSettingsVersion12
formatDateTime12
markRedeemed12
getActiveEventSettings12
getCouponByCode12
getMinimumPurchaseForEvent12
deleteEvent12
getActiveEvent12
endEvent12
checkForActiveConflict12
insertRedemptionRecord12
getStore6
getAblyService6
createEventService6
createCouponService6
createRedemptionService6
sendErrorResponse6
getSettings6
validateApiKey6
sendErrorResponse6
formatSideSettings6
formatCouponForResponse6
fromRow6
generateCode6
isRedeemable6
canRedeemForAmount6
findCouponByTransactionId6
formatDisplayCode6
formatCouponFromRow6
findByCode6
getEvent6
getActiveEvents6