Notifications/Assets.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 3 / 3 totaltotal 93.7% 30 / 32 CC 3 SCAR 4.1
CC
3
Cov
96%
styles
2.0
scripts
2.0
BEGIN
1.0
CRAP 1.5
« Notifications/Engine.pm ↑ Summary
1 package Mojolicious::Plugin::Notifications::Assets;
2 10 ▶use Mojo::Base -strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 # Don't stringify, in case someone forgot to define an engine
5 0 ▶use overload '""' => sub { '' }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine __ANON__: not called CC=1 SCAR=0.2
6  
7  
8 # Constructor
9 10 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
10 10 bless {
11 styles => [],
12 scripts => []
13 }, shift;
14 };
15  
16  
17 # Get or add styles
18 27 ▶sub styles {
Subroutine styles: called CC=2 SCAR=6.9
Pod documented
19 27 my $self = shift;
20 27 ▶ return sort @{ $self->{styles} } unless @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 21 6 27
21 6 push(@{$self->{styles}}, @_);
22 };
23  
24  
25 # Get or add scripts
26 25 ▶sub scripts {
Subroutine scripts: called CC=2 SCAR=6.9
Pod documented
27 25 my $self = shift;
28 25 ▶ return sort @{ $self->{scripts} } unless @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 19 6 25
29 6 push(@{$self->{scripts}}, @_);
30 };
31  
32  
33 10 1;
34  
35  
36 __END__
« Notifications/Engine.pm ↑ Summary