line |
true |
false |
branch |
19
|
1 |
42 |
unless ($id) |
33
|
7 |
35 |
unless $result->rows |
47
|
3 |
17 |
if (&any(sub {
not $params{$_};
}
, 'permission_name', 'resource_id')) |
52
|
2 |
15 |
if (length $params{'permission_name'} > 255 or length $params{'permission_name'} < 3) |
68
|
1 |
14 |
if $error |
77
|
1 |
5 |
unless ($id) |
82
|
1 |
4 |
if (ref $id) |
110
|
1 |
3 |
if $error |
118
|
3 |
6 |
@params % 2 ? : |
121
|
3 |
5 |
if (exists $to_update{'permission_name'} and length $to_update{'permission_name'} > 255 || length $to_update{'permission_name'} < 3) |
144
|
1 |
5 |
if $error |
146
|
1 |
4 |
unless ($result->rows) |
174
|
1 |
6 |
if $error |
181
|
2 |
9 |
unless ($params{'roles'}) |
186
|
1 |
8 |
unless ($self->permission_id) |
203
|
1 |
6 |
unless @{$params{'roles'}} |
224
|
1 |
7 |
if $error |
231
|
1 |
9 |
unless ($self->permission_id) |
236
|
1 |
8 |
if (ref $self->permission_id) |