| 1 | package WebService::SiftScience; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 5 | $WebService::SiftScience::VERSION = '0.0100'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 5 | ▶ | use Moo; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 5 | with 'WebService::Client'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 5 | ▶ | use Method::Signatures; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 5 | has '+base_url' => ( default => 'http://api.siftscience.com/v203' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 5 | has api_key => ( is => 'ro', required => 1 ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 5 | has events_uri => ( is => 'ro', default => '/events' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 5 | has score_uri => ( is => 'ro', default => '/score' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 5 | has users_uri => ( is => 'ro', default => '/users' ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | method get_score (Str $user_id) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.1
Subroutine
get_score: not called CC=5 SCAR=31.0
Branch: 3 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 0 | return $self->get($self->_score_uri($user_id) . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | '?api_key=' . $self->api_key); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 5 | ▶ | method create_event (Str $user_id, Str $type, Maybe[HashRef] $data = {}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.5
Subroutine
create_event: called CC=11 SCAR=28.2
Branch: 7 branches
Condition33%3/9
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 2 | return $self->post($self->events_uri, { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | '$type' => $type, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | '$api_key' => $self->api_key, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | '$user_id' => $user_id, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | ( %$data ) x!! $data, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | method create_account (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
create_account: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | return $self->create_event($user_id, '$create_account', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | ▶ | method update_account (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
update_account: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | return $self->create_event($user_id, '$update_account', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | method create_order (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
create_order: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | return $self->create_event($user_id, '$create_order', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | method transaction (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
transaction: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 0 | return $self->create_event($user_id, '$transaction', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | method link_session_to_user (Str $user_id, $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.5
Subroutine
link_session_to_user: not called CC=6 SCAR=34.9
Branch: 4 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | return $self->create_event($user_id, '$link_session_to_user', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 5 | ▶ | method add_item_to_cart (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.4
Subroutine
add_item_to_cart: called CC=8 SCAR=23.4
Branch: 5 branches
Condition33%2/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 1 | return $self->create_event($user_id, '$add_item_to_cart', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | method remove_item_from_cart (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
remove_item_from_cart: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 0 | return $self->create_event($user_id, '$remove_item_from_cart', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | ▶ | method submit_review (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
submit_review: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 0 | return $self->create_event($user_id, '$submit_review', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | method send_message (Str $user_id, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.8
Subroutine
send_message: not called CC=8 SCAR=40.7
Branch: 5 branches
Condition0%0/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | return $self->create_event($user_id, '$send_message', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 5 | ▶ | method login (Str $user_id, Maybe[HashRef] $data = {}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.5
Subroutine
login: called CC=8 SCAR=23.7
Branch: 5 branches
Condition33%2/6
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 1 | return $self->create_event($user_id, '$login', $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | method logout (Str $user_id) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.1
Subroutine
logout: not called CC=5 SCAR=31.0
Branch: 3 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | return $self->create_event($user_id, '$logout'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | ▶ | method custom_event (Str $user_id, Str $type, Maybe[HashRef] $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=6.1
Subroutine
custom_event: not called CC=11 SCAR=47.3
Branch: 7 branches
Condition0%0/9
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"} ||= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
$Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}
"Method::Signatures"->_make_constraint("Maybe[HashRef]")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Maybe[HashRef]"}B= "Method::Signatures"->_make_constraint("Maybe[HashRef]")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | return $self->create_event($user_id, $type, $data); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 5 | ▶ | method label_user (Str $user_id, $data) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.3
Subroutine
label_user: called CC=6 SCAR=19.2
Branch: 4 branches
Condition33%1/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 1 | return $self->post($self->_label_uri($user_id), { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | '$api_key' => $self->api_key, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | ( %$data ) x!! $data, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | ▶ | method unlabel_user (Str $user_id) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.1
Subroutine
unlabel_user: not called CC=5 SCAR=31.0
Branch: 3 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | return $self->delete($self->_label_uri($user_id) . | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | '?api_key=' . $self->api_key); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | ▶ | method _score_uri (Str $user_id) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=5.1
Subroutine
_score_uri: not called CC=5 SCAR=31.0
Branch: 3 branches
Condition0%0/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table0%0/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | return $self->score_uri . "/$user_id"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 5 | ▶ | method _label_uri (Str $user_id) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.3
Subroutine
_label_uri: called CC=5 SCAR=17.3
Branch: 3 branches
Condition33%1/3
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"Str"} ||= "Method::Signatures"->_make_constraint("Str")
$Method::Signatures::mutc{"cache"}{"Str"}
"Method::Signatures"->_make_constraint("Str")
Truth table33%1/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"Str"}B= "Method::Signatures"->_make_constraint("Str")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 1 | return $self->users_uri . "/$user_id/labels"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 5 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||