Articulate/Routes/TransparentPreviews.pm

filter: Statementstmt 75.0% 18 / 24 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 62.1% 23 / 37 SCAR 12.5
CC
3
Cov
62%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« Articulate/Service/Error.pm ↑ Summary Articulate/Sortation.pm »
1 package Articulate::Routes::TransparentPreviews;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 with 'Articulate::Role::Routes';
7 4 ▶use Articulate::Syntax::Routes;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use Articulate::Service;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 post '/zone/:zone_id/preview' => sub {
11 0 ▶ my ($self, $request) = @_;
Subroutine __ANON__: not called CC=3 SCAR=24.8
12 0 my $zone_id = $request->params->{'zone_id'};
13 0 my $article_id = $request->params->{'article_id'};
14 0 ▶ return $self->process_request( error => {
Branch: 1 branch
BranchTrueFalseTotal
unless defined $article_id and $article_id ne "" 0 0 0
Condition0%0/3
defined $article_id and $article_id ne ""
!ll&&!rl&&r
000
MC/DC0%0/2
defined $article_id and $article_id ne ""
defined $article_id $article_id ne ""
Truth table0%0/3
A and B
A= defined $article_idB= $article_id ne ""
ABresult
0X0
100
111
15 simple_message => 'Parameter article_id is required'
16 } ) unless defined $article_id and $article_id ne '';
17 0 my $content = $request->params->{'content'};
18 0 $self->process_request(
19 preview => {
20 location =>"zone/$zone_id/article/$article_id",
21 content => $content,
22 }
23 );
24 4 };
25  
26 4 1;
« Articulate/Service/Error.pm ↑ Summary Articulate/Sortation.pm »