| 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
Condition0%0/3
defined $article_id and $article_id ne ""
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 ""
| |||||||||||||||||||||||||||||
| 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; | |||||||||||||||||||||||||||