Weixin/Client/Remote/_get_qrcode_uuid.pm

filter: Statementstmt 11.1% 1 / 9 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 4.5% 1 / 22 CC 5 SCAR 34.0
CC
5
Cov
6%
_get_qrcode_uuid
30.0
CRAP 30.0
« Weixin/Model/Remote/_webwxbatchgetcontact.pm ↑ Summary Weixin/Model/Base.pm »
1 0 ▶sub Mojo::Weixin::_get_qrcode_uuid {
Subroutine _get_qrcode_uuid: not called CC=5 SCAR=34.0
2 0 my $self = shift;
3 0 my $api = 'https://login.'. $self->domain . '/jslogin';
4 0 ▶ my @query_string = (
Condition0%0/2
$self->lang || 'zh_CN'
l!l
00
MC/DC0%0/1
$self->lang || 'zh_CN'
$self->lang
Truth table0%0/2
A
A= $self->lang
Aresult
11
00
5 appid => 'wx782c26e4c19acffb',
6 redirect_uri => 'https://'.$self->domain . '/cgi-bin/mmwebwx-bin/webwxnewloginpage',
7 fun => 'new',
8 lang => $self->lang || 'zh_CN',
9 _ => $self->now(),
10 );
11 0 my $data = $self->http_get($self->gen_url2($api,@query_string));
12 0 ▶ return if not defined $data;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $data 0 0 0
13 0 $data=~s/\s+//g;
14 0 my($code,$uuid) = $data=~/window\.QRLogin\.code=(\d+);window\.QRLogin\.uuid="([^"]+)"/g;
15 0 ▶ return ($code==200 and $uuid)?$uuid: undef;
Branch: 1 branch
BranchTrueFalseTotal
$code == 200 && $uuid ? : 0 0 0
Condition0%0/3
$code == 200 and $uuid
!ll&&!rl&&r
000
MC/DC0%0/2
$code == 200 and $uuid
$code == 200 $uuid
Truth table0%0/3
A and B
A= $code == 200B= $uuid
ABresult
0X0
100
111
16 }
17 1 1;
« Weixin/Model/Remote/_webwxbatchgetcontact.pm ↑ Summary Weixin/Model/Base.pm »