REST/Group.pm

filter: Statementstmt 89.6% 26 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod 100% 1 / 1 totaltotal 87.8% 36 / 41 CC 1 SCAR 2.0
CC
1
Cov
90%
__ANON__
2.0
__ANON__
2.0
_attributes
1.4
CRAP 1.2
« REST/Queue.pm ↑ Summary REST/User.pm »
1 #!perl
2 # PODNAME: RT::Client::REST::Group
3 # ABSTRACT: group object representation.
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package RT::Client::REST::Group;
9 2 $RT::Client::REST::Group::VERSION = '0.73';
10 2 ▶use parent 'RT::Client::REST::Object';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶use Params::Validate qw(:types);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use RT::Client::REST;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 2 ▶use RT::Client::REST::Object::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use RT::Client::REST::SearchResult;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17  
18 2 ▶sub _attributes {{
Subroutine _attributes: called CC=1 SCAR=3.5
19 id => {
20 validation => {
21 type => SCALAR,
22 },
23 0 ▶ form2value => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 0 shift =~ m~^group/(\d+)$~i;
25 0 return $1;
26 },
27 0 ▶ value2form => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
28 0 return 'group/' . shift;
29 },
30 },
31  
32 2 name => {
33 validation => {
34 type => SCALAR,
35 },
36 },
37 description => {
38 validation => {
39 type => SCALAR,
40 },
41 },
42 members => {
43 validation => {
44 type => ARRAYREF,
45 },
46 list => 1,
47 },
48 disabled => {
49 validation => {
50 type => SCALAR,
51 },
52 },
53 }}
54  
55  
56 1 ▶sub rt_type { 'group' }
Subroutine rt_type: called CC=1 SCAR=0.0
Pod documented
57  
58  
59 2 __PACKAGE__->_generate_methods;
60  
61 2 1;
62  
63 __END__
« REST/Queue.pm ↑ Summary REST/User.pm »