line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Critic::Policy::OTRS::ProhibitFetchrowHashref; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Do no use FetchrowHashref |
4
|
|
|
|
|
|
|
|
5
|
24
|
|
|
24
|
|
14595
|
use strict; |
|
24
|
|
|
|
|
66
|
|
|
24
|
|
|
|
|
703
|
|
6
|
24
|
|
|
24
|
|
335
|
use warnings; |
|
24
|
|
|
|
|
50
|
|
|
24
|
|
|
|
|
790
|
|
7
|
|
|
|
|
|
|
|
8
|
24
|
|
|
24
|
|
157
|
use Perl::Critic::Utils qw{ :severities :classification :ppi }; |
|
24
|
|
|
|
|
214
|
|
|
24
|
|
|
|
|
1344
|
|
9
|
24
|
|
|
24
|
|
8590
|
use base 'Perl::Critic::Policy'; |
|
24
|
|
|
|
|
51
|
|
|
24
|
|
|
|
|
2093
|
|
10
|
|
|
|
|
|
|
|
11
|
24
|
|
|
24
|
|
146
|
use Readonly; |
|
24
|
|
|
|
|
49
|
|
|
24
|
|
|
|
|
5250
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Readonly::Scalar my $DESC => q{Method FetchrowHashref() is deprecated.}; |
16
|
|
|
|
|
|
|
Readonly::Scalar my $EXPL => q{Use other methods of DBObject instead. FetchrowHashref() does not work on all database systems}; |
17
|
|
|
|
|
|
|
|
18
|
12
|
|
|
12
|
1
|
28743
|
sub supported_parameters { return; } |
19
|
2
|
|
|
2
|
1
|
24
|
sub default_severity { return $SEVERITY_HIGHEST; } |
20
|
1
|
|
|
1
|
1
|
560
|
sub default_themes { return qw( otrs otrs_lt_3_3 ) } |
21
|
3
|
|
|
3
|
1
|
228037
|
sub applies_to { return 'PPI::Token::Operator' } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub violates { |
24
|
6
|
|
|
6
|
1
|
199
|
my ( $self, $elem ) = @_; |
25
|
|
|
|
|
|
|
|
26
|
6
|
100
|
|
|
|
17
|
return if $elem ne '->'; |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
|
|
67
|
my $method = $elem->snext_sibling; |
29
|
4
|
100
|
|
|
|
113
|
return if $method ne 'FetchrowHashref'; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
25
|
return $self->violation( $DESC, $EXPL, $elem ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Perl::Critic::Policy::OTRS::ProhibitFetchrowHashref - Do no use FetchrowHashref |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.09 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 METHODS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 supported_parameters |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
There are no supported parameters. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Renee Baecker <info@perl-services.de> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This software is Copyright (c) 2013 by Renee Baecker. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This is free software, licensed under: |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |